",{"class":"slides-control"}),a=1;this.$el=t(n),this.$container=this.$el.find(this.options.elements.container);var r=function(){return a=s._findMultiplier(),s.$el.on("click",s.options.elements.nav+" a",function(i){i.preventDefault(),s.stop(),t(this).hasClass("next")?s.animate("next",function(){s.start()}):s.animate("prev",function(){s.start()})}),t(document).on("keyup",function(i){37===i.keyCode&&s.animate("prev"),39===i.keyCode&&s.animate("next")}),t(i).on("resize",function(){setTimeout(function(){var i=s.$container.children();s.width=s._findWidth(),s.height=s._findHeight(),i.css({width:s.width,left:s.width}),s.css.containers(),s.css.images()},10)}),s.options.hashchange&&t(i).on("hashchange",function(){var i,t=s._parseHash();i=s._upcomingSlide(t),i>=0&&i!==s.current&&s.animate(i)}),s.pagination._events(),s.start(),s},h={containers:function(){s.init?(s.$el.css({height:s.height}),s.$control.css({width:s.width*a,left:-s.width}),s.$container.css({})):(t("body").css({margin:0}),s.$el.css({position:"relative",overflow:"hidden",width:"100%",height:s.height}),s.$control.css({position:"relative",transform:"translate3d(0)",height:"100%",width:s.width*a,left:-s.width}),s.$container.css({display:"none",margin:"0",padding:"0",listStyle:"none",position:"relative",height:"100%"})),1===s.size()&&s.$el.find(s.options.elements.nav).hide()},images:function(){var i=s.$container.find("img").not(s.options.elements.preserve);i.removeAttr("width").removeAttr("height").css({"-webkit-backface-visibility":"hidden","-ms-interpolation-mode":"bicubic",position:"absolute",left:"0",top:"0","z-index":"-1","max-width":"none"}),i.each(function(){var i=s.image._aspectRatio(this),n=this;if(t.data(this,"processed"))s.image._scale(n,i),s.image._center(n,i);else{var e=new Image;e.onload=function(){s.image._scale(n,i),s.image._center(n,i),t.data(n,"processed",!0)},e.src=this.src}})},children:function(){var i=s.$container.children();i.is("img")&&(i.each(function(){if(t(this).is("img")){t(this).wrap("
");var i=t(this).attr("id");t(this).removeAttr("id"),t(this).parent().attr("id",i)}}),i=s.$container.children()),s.init||i.css({display:"none",left:2*s.width}),i.css({position:"absolute",overflow:"hidden",height:"100%",width:s.width,top:0,zIndex:0})}},c={slide:function(i,t){var n=s.$container.children(),e=n.eq(i.upcoming_slide);e.css({left:i.upcoming_position,display:"block"}),s.$control.animate({left:i.offset},s.options.animation_speed,s.options.animation_easing,function(){s.size()>1&&(s.$control.css({left:-s.width}),n.eq(i.upcoming_slide).css({left:s.width,zIndex:2}),i.outgoing_slide>=0&&n.eq(i.outgoing_slide).css({left:s.width,display:"none",zIndex:0})),t()})},fade:function(i,t){var n=this,e=n.$container.children(),s=e.eq(i.outgoing_slide),o=e.eq(i.upcoming_slide);o.css({left:this.width,opacity:0,display:"block"}).animate({opacity:1},n.options.animation_speed,n.options.animation_easing),i.outgoing_slide>=0?s.animate({opacity:0},n.options.animation_speed,n.options.animation_easing,function(){n.size()>1&&(e.eq(i.upcoming_slide).css({zIndex:2}),i.outgoing_slide>=0&&e.eq(i.outgoing_slide).css({opacity:1,display:"none",zIndex:0})),t()}):(o.css({zIndex:2}),t())}};c=t.extend(c,t.fn.superslides.fx);var d={_centerY:function(i){var n=t(i);n.css({top:(s.height-n.height())/2})},_centerX:function(i){var n=t(i);n.css({left:(s.width-n.width())/2})},_center:function(i){s.image._centerX(i),s.image._centerY(i)},_aspectRatio:function(i){if(!i.naturalHeight&&!i.naturalWidth){var t=new Image;t.src=i.src,i.naturalHeight=t.height,i.naturalWidth=t.width}return i.naturalHeight/i.naturalWidth},_scale:function(i,n){n=n||s.image._aspectRatio(i);var e=s.height/s.width,o=t(i);e>n?o.css({height:s.height,width:s.height/n}):o.css({height:s.width*n,width:s.width})}},l={_setCurrent:function(i){if(s.$pagination){var t=s.$pagination.children();t.removeClass("current"),t.eq(i).addClass("current")}},_addItem:function(i){var n=i+1,e=n,o=s.$container.children().eq(i),a=o.attr("id");a&&(e=a);var r=t("
",{href:"#"+e,text:e});r.appendTo(s.$pagination)},_setup:function(){if(s.options.pagination&&1!==s.size()){var i=t("",{"class":s.options.elements.pagination.replace(/^\./,"")});s.$pagination=i.appendTo(s.$el);for(var n=0;s.size()>n;n++)s.pagination._addItem(n)}},_events:function(){s.$el.on("click",s.options.elements.pagination+" a",function(i){i.preventDefault();var t,n=s._parseHash(this.hash);t=s._upcomingSlide(n,!0),t!==s.current&&s.animate(t,function(){s.start()})})}};return this.css=h,this.image=d,this.pagination=l,this.fx=c,this.animation=this.fx[this.options.animation],this.$control=this.$container.wrap(o).parent(".slides-control"),s._findPositions(),s.width=s._findWidth(),s.height=s._findHeight(),this.css.children(),this.css.containers(),this.css.images(),this.pagination._setup(),r()},n.prototype={_findWidth:function(){return t(this.options.inherit_width_from).width()},_findHeight:function(){return t(this.options.inherit_height_from).height()},_findMultiplier:function(){return 1===this.size()?1:3},_upcomingSlide:function(i,t){if(t&&!isNaN(i)&&(i-=1),/next/.test(i))return this._nextInDom();if(/prev/.test(i))return this._prevInDom();if(/\d/.test(i))return+i;if(i&&/\w/.test(i)){var n=this._findSlideById(i);return n>=0?n:0}return 0},_findSlideById:function(i){return this.$container.find("#"+i).index()},_findPositions:function(i,t){t=t||this,void 0===i&&(i=-1),t.current=i,t.next=t._nextInDom(),t.prev=t._prevInDom()},_nextInDom:function(){var i=this.current+1;return i===this.size()&&(i=0),i},_prevInDom:function(){var i=this.current-1;return 0>i&&(i=this.size()-1),i},_parseHash:function(t){return t=t||i.location.hash,t=t.replace(/^#/,""),t&&!isNaN(+t)&&(t=+t),t},size:function(){return this.$container.children().length},destroy:function(){return this.$el.removeData()},update:function(){this.css.children(),this.css.containers(),this.css.images(),this.pagination._addItem(this.size()),this._findPositions(this.current),this.$el.trigger("updated.slides")},stop:function(){clearInterval(this.play_id),delete this.play_id,this.$el.trigger("stopped.slides")},start:function(){var n=this;n.options.hashchange?t(i).trigger("hashchange"):this.animate(),this.options.play&&(this.play_id&&this.stop(),this.play_id=setInterval(function(){n.animate()},this.options.play)),this.$el.trigger("started.slides")},animate:function(t,n){var e=this,s={};if(!(this.animating||(this.animating=!0,void 0===t&&(t="next"),s.upcoming_slide=this._upcomingSlide(t),s.upcoming_slide>=this.size()))){if(s.outgoing_slide=this.current,s.upcoming_position=2*this.width,s.offset=-s.upcoming_position,("prev"===t||s.outgoing_slide>t)&&(s.upcoming_position=0,s.offset=0),e.size()>1&&e.pagination._setCurrent(s.upcoming_slide),e.options.hashchange){var o=s.upcoming_slide+1,a=e.$container.children(":eq("+s.upcoming_slide+")").attr("id");i.location.hash=a?a:o}e.$el.trigger("animating.slides",[s]),e.animation(s,function(){e._findPositions(s.upcoming_slide,e),"function"==typeof n&&n(),e.animating=!1,e.$el.trigger("animated.slides"),e.init||(e.$el.trigger("init.slides"),e.init=!0,e.$container.fadeIn("fast"))})}}},t.fn[e]=function(i,s){var o=[];return this.each(function(){var a,r,h;return a=t(this),r=a.data(e),h="object"==typeof i&&i,r||(o=a.data(e,r=new n(this,h))),"string"==typeof i&&(o=r[i],"function"==typeof o)?o=o.call(r,s):void 0}),o},t.fn[e].fx={}})(this,jQuery);
(function($){'use strict';var $window=$(window);var windowHeight=$window.height();$window.resize(function(){windowHeight=$window.height();});$.fn.parallax=function(xpos,speedFactor,outerHeight){var $this=$(this);var getHeight;var firstTop;var paddingTop=0;function update(){$this.each(function(){firstTop=$this.offset().top;});if(outerHeight){getHeight=function(jqo){return jqo.outerHeight(true);};}else{getHeight=function(jqo){return jqo.height();};}
if(arguments.length<1||xpos===null)xpos="50%";if(arguments.length<2||speedFactor===null)speedFactor=0.5;if(arguments.length<3||outerHeight===null)outerHeight=true;var pos=$window.scrollTop();$this.each(function(){var $element=$(this);var top=$element.offset().top;var height=getHeight($element);if(top+heightpos+windowHeight){return;}
$this.css('backgroundPosition',xpos+" "+Math.round((firstTop-pos)*speedFactor)+"px");});}
$window.bind('scroll',update).resize(update);update();};})(jQuery);
(function(d){d.fn.visible=function(e,i){var a=d(this).eq(0),f=a.get(0),c=d(window),g=c.scrollTop();c=g+c.height();var b=a.offset().top,h=b+a.height();a=e===true?h:b;b=e===true?b:h;return!!(i===true?f.offsetWidth*f.offsetHeight:true)&&b<=c&&a>=g}})(jQuery);
!function(){function e(){var e=!1;e&&c("keydown",r),v.keyboardSupport&&!e&&u("keydown",r)}function t(){if(document.body){var t=document.body,o=document.documentElement,n=window.innerHeight,r=t.scrollHeight;if(S=document.compatMode.indexOf("CSS")>=0?o:t,w=t,e(),x=!0,top!=self)y=!0;else if(r>n&&(t.offsetHeight<=n||o.offsetHeight<=n)){var a=!1,i=function(){a||o.scrollHeight==document.height||(a=!0,setTimeout(function(){o.style.height=document.height+"px",a=!1},500))};if(o.style.height="auto",setTimeout(i,10),S.offsetHeight<=n){var l=document.createElement("div");l.style.clear="both",t.appendChild(l)}}v.fixedBackground||b||(t.style.backgroundAttachment="scroll",o.style.backgroundAttachment="scroll")}}function o(e,t,o,n){if(n||(n=1e3),d(t,o),1!=v.accelerationMax){var r=+new Date,a=r-C;if(a1&&(i=Math.min(i,v.accelerationMax),t*=i,o*=i)}C=+new Date}if(M.push({x:t,y:o,lastX:0>t?.99:-.99,lastY:0>o?.99:-.99,start:+new Date}),!T){var l=e===document.body,u=function(){for(var r=+new Date,a=0,i=0,c=0;c=v.animationTime,h=f?1:d/v.animationTime;v.pulseAlgorithm&&(h=p(h));var m=s.x*h-s.lastX>>0,w=s.y*h-s.lastY>>0;a+=m,i+=w,s.lastX+=m,s.lastY+=w,f&&(M.splice(c,1),c--)}l?window.scrollBy(a,i):(a&&(e.scrollLeft+=a),i&&(e.scrollTop+=i)),t||o||(M=[]),M.length?E(u,e,n/v.frameRate+1):T=!1};E(u,e,0),T=!0}}function n(e){x||t();var n=e.target,r=l(n);if(!r||e.defaultPrevented||s(w,"embed")||s(n,"embed")&&/\.pdf/i.test(n.src))return!0;var a=e.wheelDeltaX||0,i=e.wheelDeltaY||0;return a||i||(i=e.wheelDelta||0),!v.touchpadSupport&&f(i)?!0:(Math.abs(a)>1.2&&(a*=v.stepSize/120),Math.abs(i)>1.2&&(i*=v.stepSize/120),o(r,-a,-i),void e.preventDefault())}function r(e){var t=e.target,n=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==H.spacebar;if(/input|textarea|select|embed/i.test(t.nodeName)||t.isContentEditable||e.defaultPrevented||n)return!0;if(s(t,"button")&&e.keyCode===H.spacebar)return!0;var r,a=0,i=0,u=l(w),c=u.clientHeight;switch(u==document.body&&(c=window.innerHeight),e.keyCode){case H.up:i=-v.arrowScroll;break;case H.down:i=v.arrowScroll;break;case H.spacebar:r=e.shiftKey?1:-1,i=-r*c*.9;break;case H.pageup:i=.9*-c;break;case H.pagedown:i=.9*c;break;case H.home:i=-u.scrollTop;break;case H.end:var d=u.scrollHeight-u.scrollTop-c;i=d>0?d+10:0;break;case H.left:a=-v.arrowScroll;break;case H.right:a=v.arrowScroll;break;default:return!0}o(u,a,i),e.preventDefault()}function a(e){w=e.target}function i(e,t){for(var o=e.length;o--;)z[N(e[o])]=t;return t}function l(e){var t=[],o=S.scrollHeight;do{var n=z[N(e)];if(n)return i(t,n);if(t.push(e),o===e.scrollHeight){if(!y||S.clientHeight+100?1:-1,t=t>0?1:-1,(k.x!==e||k.y!==t)&&(k.x=e,k.y=t,M=[],C=0)}function f(e){if(e){e=Math.abs(e),D.push(e),D.shift(),clearTimeout(A);var t=D[0]==D[1]&&D[1]==D[2],o=h(D[0],120)&&h(D[1],120)&&h(D[2],120);return!(t||o)}}function h(e,t){return Math.floor(e/t)==e/t}function m(e){var t,o,n;return e*=v.pulseScale,1>e?t=e-(1-Math.exp(-e)):(o=Math.exp(-1),e-=1,n=1-Math.exp(-e),t=o+n*(1-o)),t*v.pulseNormalize}function p(e){return e>=1?1:0>=e?0:(1==v.pulseNormalize&&(v.pulseNormalize/=m(1)),m(e))}var w,g={frameRate:150,animationTime:800,stepSize:120,pulseAlgorithm:!0,pulseScale:8,pulseNormalize:1,accelerationDelta:20,accelerationMax:1,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!0,fixedBackground:!0,excluded:""},v=g,b=!1,y=!1,k={x:0,y:0},x=!1,S=document.documentElement,D=[120,120,120],H={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},v=g,M=[],T=!1,C=+new Date,z={};setInterval(function(){z={}},1e4);var A,N=function(){var e=0;return function(t){return t.uniqueID||(t.uniqueID=e++)}}(),E=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e,t,o){window.setTimeout(e,o||1e3/60)}}(),K=/chrome/i.test(window.navigator.userAgent),L="onmousewheel"in document;L&&K&&(u("mousedown",a),u("mousewheel",n),u("load",t))}();
(function($){"use strict";$.fn.fitVids=function(options){var settings={customSelector:null,ignore:null};if(!document.getElementById('fit-vids-style')){var head=document.head||document.getElementsByTagName('head')[0];var css='.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';var div=document.createElement('div');div.innerHTML='x
';head.appendChild(div.childNodes[1]);}
if(options){$.extend(settings,options);}
return this.each(function(){var selectors=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];if(settings.customSelector){selectors.push(settings.customSelector);}
var ignoreList='.fitvidsignore';if(settings.ignore){ignoreList=ignoreList+', '+settings.ignore;}
var $allVideos=$(this).find(selectors.join(','));$allVideos=$allVideos.not("object object");$allVideos=$allVideos.not(ignoreList);$allVideos.each(function(){var $this=$(this);if($this.parents(ignoreList).length>0){return;}
if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){return;}
if((!$this.css('height')&&!$this.css('width'))&&(isNaN($this.attr('height'))||isNaN($this.attr('width')))){$this.attr('height',9);$this.attr('width',16);}
var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'),10))))?parseInt($this.attr('height'),10):$this.height(),width=!isNaN(parseInt($this.attr('width'),10))?parseInt($this.attr('width'),10):$this.width(),aspectRatio=height / width;if(!$this.attr('id')){var videoID='fitvid'+Math.floor(Math.random()*999999);$this.attr('id',videoID);}
$this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top',(aspectRatio*100)+"%");$this.removeAttr('height').removeAttr('width');});});};})(window.jQuery||window.Zepto);
(function(e,t){"use strict";e.fn.gMap=function(t,n){var r,i;if((!window.google||!google.maps)&&!window.google_maps_api_loading){r=this;i=arguments;var s="callback_"+Math.random().toString().replace(".","");window.google_maps_api_loading=s;window[s]=function(){e.fn.gMap.apply(r,i);e(window).trigger("google-maps-async-loading");window[s]=null;try{delete window[s]}catch(t){}};var o=window.WPV_FRONT&&window.WPV_FRONT.gmap_api_key?"&key="+WPV_FRONT.gmap_api_key:"";e.getScript(location.protocol+"//maps.googleapis.com/maps/api/js?v=3&sensor=false&callback="+s+o);return this}else if((!window.google||!google.maps)&&window.google_maps_api_loading){r=this;i=arguments;e(window).bind("google-maps-async-loading",function(){e.fn.gMap.apply(r,i)});return this}switch(t){case"addMarker":return e(this).trigger("gMap.addMarker",[n.latitude,n.longitude,n.content,n.icon,n.popup]);case"centerAt":return e(this).trigger("gMap.centerAt",[n.latitude,n.longitude,n.zoom])}var u=e.extend({},e.fn.gMap.defaults,t);return this.each(function(){var t=new google.maps.Map(this);var n=new google.maps.Geocoder;if(u.address){n.geocode({address:u.address},function(e){if(e&&e.length)t.setCenter(e[0].geometry.location)})}else{if(u.latitude&&u.longitude){t.setCenter(new google.maps.LatLng(u.latitude,u.longitude))}else{if(e.isArray(u.markers)&&u.markers.length>0){if(u.markers[0].address){n.geocode({address:u.markers[0].address},function(e){if(e&&e.length>0)t.setCenter(e[0].geometry.location)})}else{t.setCenter(new google.maps.LatLng(u.markers[0].latitude,u.markers[0].longitude))}}else{t.setCenter(new google.maps.LatLng(34.885931,9.84375))}}}t.setZoom(u.zoom);t.setMapTypeId(google.maps.MapTypeId[u.maptype]);var r={scrollwheel:u.scrollwheel,disableDoubleClickZoom:!u.doubleclickzoom};if(u.controls===false){e.extend(r,{disableDefaultUI:true})}else if(u.controls.length!==0){e.extend(r,u.controls,{disableDefaultUI:true})}t.setOptions(e.extend(r,u.custom));var i=new google.maps.Marker;var s=new google.maps.MarkerImage(u.icon.image);s.size=new google.maps.Size(u.icon.iconsize[0],u.icon.iconsize[1]);s.anchor=new google.maps.Point(u.icon.iconanchor[0],u.icon.iconanchor[1]);i.setIcon(s);if(u.icon.shadow){var o=new google.maps.MarkerImage(u.icon.shadow);o.size=new google.maps.Size(u.icon.shadowsize[0],u.icon.shadowsize[1]);o.anchor=new google.maps.Point(u.icon.shadowanchor[0],u.icon.shadowanchor[1]);i.setShadow(o)}e(this).bind("gMap.centerAt",function(e,n,r,i){if(i)t.setZoom(i);t.panTo(new google.maps.LatLng(parseFloat(n),parseFloat(r)))});var a;e(this).bind("gMap.addMarker",function(e,n,r,f,l,c){var h=new google.maps.LatLng(parseFloat(n),parseFloat(r));var p=new google.maps.Marker({position:h});if(l){s=new google.maps.MarkerImage(l.image);s.size=new google.maps.Size(l.iconsize[0],l.iconsize[1]);s.anchor=new google.maps.Point(l.iconanchor[0],l.iconanchor[1]);p.setIcon(s);if(l.shadow){o=new google.maps.MarkerImage(l.shadow);o.size=new google.maps.Size(l.shadowsize[0],l.shadowsize[1]);o.anchor=new google.maps.Point(l.shadowanchor[0],l.shadowanchor[1]);i.setShadow(o)}}else{p.setIcon(i.getIcon());p.setShadow(i.getShadow())}if(f){if(f==="_latlng")f=n+", "+r;var d=new google.maps.InfoWindow({content:u.html_prepend+f+u.html_append});google.maps.event.addListener(p,"click",function(){if(a)a.close();d.open(t,p);a=d});if(c)d.open(t,p)}p.setMap(t)});var f=function(t,n){return function(r){if(r&&r.length>0){e(n).trigger("gMap.addMarker",[r[0].geometry.location.lat(),r[0].geometry.location.lng(),t.html,t.icon,t.popup])}}};for(var l=0;l',html_append:" ",icon:{image:"http://www.google.com/mapfiles/marker.png",shadow:"http://www.google.com/mapfiles/shadow50.png",iconsize:[20,34],shadowsize:[37,34],iconanchor:[9,34],shadowanchor:[6,34]}}})(jQuery)
!function(a,b,c,d){function e(b,c){this.element=b,this.options=a.extend({},g,c),this._defaults=g,this._name=f,this.init()}var f="stellar",g={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function(a){a.hide()},showElement:function(a){a.show()}},h={scroll:{getLeft:function(a){return a.scrollLeft()},setLeft:function(a,b){a.scrollLeft(b)},getTop:function(a){return a.scrollTop()},setTop:function(a,b){a.scrollTop(b)}},position:{getLeft:function(a){return-1*parseInt(a.css("left"),10)},getTop:function(a){return-1*parseInt(a.css("top"),10)}},margin:{getLeft:function(a){return-1*parseInt(a.css("margin-left"),10)},getTop:function(a){return-1*parseInt(a.css("margin-top"),10)}},transform:{getLeft:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[4],10):0},getTop:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[5],10):0}}},i={position:{setLeft:function(a,b){a.css("left",b)},setTop:function(a,b){a.css("top",b)}},transform:{setPosition:function(a,b,c,d,e){a[0].style[k]="translate3d("+(b-c)+"px, "+(d-e)+"px, 0)"}}},j=function(){var b,c=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,d=a("script")[0].style,e="";for(b in d)if(c.test(b)){e=b.match(c)[0];break}return"WebkitOpacity"in d&&(e="Webkit"),"KhtmlOpacity"in d&&(e="Khtml"),function(a){return e+(e.length>0?a.charAt(0).toUpperCase()+a.slice(1):a)}}(),k=j("transform"),l=a("
",{style:"background:#fff"}).css("background-position-x")!==d,m=l?function(a,b,c){a.css({"background-position-x":b,"background-position-y":c})}:function(a,b,c){a.css("background-position",b+" "+c)},n=l?function(a){return[a.css("background-position-x"),a.css("background-position-y")]}:function(a){return a.css("background-position").split(" ")},o=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)};e.prototype={init:function(){this.options.name=f+"_"+Math.floor(1e9*Math.random()),this._defineElements(),this._defineGetters(),this._defineSetters(),this._handleWindowLoadAndResize(),this._detectViewport(),this.refresh({firstLoad:!0}),"scroll"===this.options.scrollProperty?this._handleScrollEvent():this._startAnimationLoop()},_defineElements:function(){this.element===c.body&&(this.element=b),this.$scrollElement=a(this.element),this.$element=this.element===b?a("body"):this.$scrollElement,this.$viewportElement=this.options.viewportElement!==d?a(this.options.viewportElement):this.$scrollElement[0]===b||"scroll"===this.options.scrollProperty?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var a=this,b=h[a.options.scrollProperty];this._getScrollLeft=function(){return b.getLeft(a.$scrollElement)},this._getScrollTop=function(){return b.getTop(a.$scrollElement)}},_defineSetters:function(){var b=this,c=h[b.options.scrollProperty],d=i[b.options.positionProperty],e=c.setLeft,f=c.setTop;this._setScrollLeft="function"==typeof e?function(a){e(b.$scrollElement,a)}:a.noop,this._setScrollTop="function"==typeof f?function(a){f(b.$scrollElement,a)}:a.noop,this._setPosition=d.setPosition||function(a,c,e,f,g){b.options.horizontalScrolling&&d.setLeft(a,c,e),b.options.verticalScrolling&&d.setTop(a,f,g)}},_handleWindowLoadAndResize:function(){var c=this,d=a(b);c.options.responsive&&d.bind("load."+this.name,function(){c.refresh()}),d.bind("resize."+this.name,function(){c._detectViewport(),c.options.responsive&&c.refresh()})},refresh:function(c){var d=this,e=d._getScrollLeft(),f=d._getScrollTop();c&&c.firstLoad||this._reset(),this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),c&&c.firstLoad&&/WebKit/.test(navigator.userAgent)&&a(b).load(function(){var a=d._getScrollLeft(),b=d._getScrollTop();d._setScrollLeft(a+1),d._setScrollTop(b+1),d._setScrollLeft(a),d._setScrollTop(b)}),this._setScrollLeft(e),this._setScrollTop(f)},_detectViewport:function(){var a=this.$viewportElement.offset(),b=null!==a&&a!==d;this.viewportWidth=this.$viewportElement.width(),this.viewportHeight=this.$viewportElement.height(),this.viewportOffsetTop=b?a.top:0,this.viewportOffsetLeft=b?a.left:0},_findParticles:function(){{var b=this;this._getScrollLeft(),this._getScrollTop()}if(this.particles!==d)for(var c=this.particles.length-1;c>=0;c--)this.particles[c].$element.data("stellar-elementIsActive",d);this.particles=[],this.options.parallaxElements&&this.$element.find("[data-stellar-ratio]").each(function(){var c,e,f,g,h,i,j,k,l,m=a(this),n=0,o=0,p=0,q=0;if(m.data("stellar-elementIsActive")){if(m.data("stellar-elementIsActive")!==this)return}else m.data("stellar-elementIsActive",this);b.options.showElement(m),m.data("stellar-startingLeft")?(m.css("left",m.data("stellar-startingLeft")),m.css("top",m.data("stellar-startingTop"))):(m.data("stellar-startingLeft",m.css("left")),m.data("stellar-startingTop",m.css("top"))),f=m.position().left,g=m.position().top,h="auto"===m.css("margin-left")?0:parseInt(m.css("margin-left"),10),i="auto"===m.css("margin-top")?0:parseInt(m.css("margin-top"),10),k=m.offset().left-h,l=m.offset().top-i,m.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(n=p,o=q,j=b,!1):(p+=b.position().left,void(q+=b.position().top))}),c=m.data("stellar-horizontal-offset")!==d?m.data("stellar-horizontal-offset"):j!==d&&j.data("stellar-horizontal-offset")!==d?j.data("stellar-horizontal-offset"):b.horizontalOffset,e=m.data("stellar-vertical-offset")!==d?m.data("stellar-vertical-offset"):j!==d&&j.data("stellar-vertical-offset")!==d?j.data("stellar-vertical-offset"):b.verticalOffset,b.particles.push({$element:m,$offsetParent:j,isFixed:"fixed"===m.css("position"),horizontalOffset:c,verticalOffset:e,startingPositionLeft:f,startingPositionTop:g,startingOffsetLeft:k,startingOffsetTop:l,parentOffsetLeft:n,parentOffsetTop:o,stellarRatio:m.data("stellar-ratio")!==d?m.data("stellar-ratio"):1,width:m.outerWidth(!0),height:m.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var b,c=this,e=this._getScrollLeft(),f=this._getScrollTop();this.backgrounds=[],this.options.parallaxBackgrounds&&(b=this.$element.find("[data-stellar-background-ratio]"),this.$element.data("stellar-background-ratio")&&(b=b.add(this.$element)),b.each(function(){var b,g,h,i,j,k,l,o=a(this),p=n(o),q=0,r=0,s=0,t=0;if(o.data("stellar-backgroundIsActive")){if(o.data("stellar-backgroundIsActive")!==this)return}else o.data("stellar-backgroundIsActive",this);o.data("stellar-backgroundStartingLeft")?m(o,o.data("stellar-backgroundStartingLeft"),o.data("stellar-backgroundStartingTop")):(o.data("stellar-backgroundStartingLeft",p[0]),o.data("stellar-backgroundStartingTop",p[1])),h="auto"===o.css("margin-left")?0:parseInt(o.css("margin-left"),10),i="auto"===o.css("margin-top")?0:parseInt(o.css("margin-top"),10),j=o.offset().left-h-e,k=o.offset().top-i-f,o.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(q=s,r=t,l=b,!1):(s+=b.position().left,void(t+=b.position().top))}),b=o.data("stellar-horizontal-offset")!==d?o.data("stellar-horizontal-offset"):l!==d&&l.data("stellar-horizontal-offset")!==d?l.data("stellar-horizontal-offset"):c.horizontalOffset,g=o.data("stellar-vertical-offset")!==d?o.data("stellar-vertical-offset"):l!==d&&l.data("stellar-vertical-offset")!==d?l.data("stellar-vertical-offset"):c.verticalOffset,c.backgrounds.push({$element:o,$offsetParent:l,isFixed:"fixed"===o.css("background-attachment"),horizontalOffset:b,verticalOffset:g,startingValueLeft:p[0],startingValueTop:p[1],startingBackgroundPositionLeft:isNaN(parseInt(p[0],10))?0:parseInt(p[0],10),startingBackgroundPositionTop:isNaN(parseInt(p[1],10))?0:parseInt(p[1],10),startingPositionLeft:o.position().left,startingPositionTop:o.position().top,startingOffsetLeft:j,startingOffsetTop:k,parentOffsetLeft:q,parentOffsetTop:r,stellarRatio:o.data("stellar-background-ratio")===d?1:o.data("stellar-background-ratio")})}))},_reset:function(){var a,b,c,d,e;for(e=this.particles.length-1;e>=0;e--)a=this.particles[e],b=a.$element.data("stellar-startingLeft"),c=a.$element.data("stellar-startingTop"),this._setPosition(a.$element,b,b,c,c),this.options.showElement(a.$element),a.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null);for(e=this.backgrounds.length-1;e>=0;e--)d=this.backgrounds[e],d.$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null),m(d.$element,d.startingValueLeft,d.startingValueTop)},destroy:function(){this._reset(),this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name),this._animationLoop=a.noop,a(b).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var c=this,d=a(b);d.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),"function"==typeof this.options.horizontalOffset?(this.horizontalOffset=this.options.horizontalOffset(),d.bind("resize.horizontal-"+this.name,function(){c.horizontalOffset=c.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset,"function"==typeof this.options.verticalOffset?(this.verticalOffset=this.options.verticalOffset(),d.bind("resize.vertical-"+this.name,function(){c.verticalOffset=c.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var a,b,c,d,e,f,g,h,i,j,k=this._getScrollLeft(),l=this._getScrollTop(),n=!0,o=!0;if(this.currentScrollLeft!==k||this.currentScrollTop!==l||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){for(this.currentScrollLeft=k,this.currentScrollTop=l,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight,j=this.particles.length-1;j>=0;j--)a=this.particles[j],b=a.isFixed?1:0,this.options.horizontalScrolling?(f=(k+a.horizontalOffset+this.viewportOffsetLeft+a.startingPositionLeft-a.startingOffsetLeft+a.parentOffsetLeft)*-(a.stellarRatio+b-1)+a.startingPositionLeft,h=f-a.startingPositionLeft+a.startingOffsetLeft):(f=a.startingPositionLeft,h=a.startingOffsetLeft),this.options.verticalScrolling?(g=(l+a.verticalOffset+this.viewportOffsetTop+a.startingPositionTop-a.startingOffsetTop+a.parentOffsetTop)*-(a.stellarRatio+b-1)+a.startingPositionTop,i=g-a.startingPositionTop+a.startingOffsetTop):(g=a.startingPositionTop,i=a.startingOffsetTop),this.options.hideDistantElements&&(o=!this.options.horizontalScrolling||h+a.width>(a.isFixed?0:k)&&h<(a.isFixed?0:k)+this.viewportWidth+this.viewportOffsetLeft,n=!this.options.verticalScrolling||i+a.height>(a.isFixed?0:l)&&i<(a.isFixed?0:l)+this.viewportHeight+this.viewportOffsetTop),o&&n?(a.isHidden&&(this.options.showElement(a.$element),a.isHidden=!1),this._setPosition(a.$element,f,a.startingPositionLeft,g,a.startingPositionTop)):a.isHidden||(this.options.hideElement(a.$element),a.isHidden=!0);for(j=this.backgrounds.length-1;j>=0;j--)c=this.backgrounds[j],b=c.isFixed?0:1,d=this.options.horizontalScrolling?(k+c.horizontalOffset-this.viewportOffsetLeft-c.startingOffsetLeft+c.parentOffsetLeft-c.startingBackgroundPositionLeft)*(b-c.stellarRatio)+"px":c.startingValueLeft,e=this.options.verticalScrolling?(l+c.verticalOffset-this.viewportOffsetTop-c.startingOffsetTop+c.parentOffsetTop-c.startingBackgroundPositionTop)*(b-c.stellarRatio)+"px":c.startingValueTop,m(c.$element,d,e)}},_handleScrollEvent:function(){var a=this,b=!1,c=function(){a._repositionElements(),b=!1},d=function(){b||(o(c),b=!0)};this.$scrollElement.bind("scroll."+this.name,d),d()},_startAnimationLoop:function(){var a=this;this._animationLoop=function(){o(a._animationLoop),a._repositionElements()},this._animationLoop()}},a.fn[f]=function(b){var c=arguments;return b===d||"object"==typeof b?this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))}):"string"==typeof b&&"_"!==b[0]&&"init"!==b?this.each(function(){var d=a.data(this,"plugin_"+f);d instanceof e&&"function"==typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(c,1)),"destroy"===b&&a.data(this,"plugin_"+f,null)}):void 0},a[f]=function(){var c=a(b);return c.stellar.apply(c,Array.prototype.slice.call(arguments,0))},a[f].scrollProperty=h,a[f].positionProperty=i,b.Stellar=e}(jQuery,this,document);
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(b.target).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("
").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c;return a(this[0]).is("form")?b=this.validate().form():(b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b})),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,b){(9!==b.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date(ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!this.is(e.ignore)&&e[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",b).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",b),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?a("input[name='"+b.name+"']:checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a
Warning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\])/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),/min|max/.test(c)&&(null===g||/number|range|text/.test(g))&&(d=Number(d)),d||0===d?e[c]=d:g===c&&"range"!==g&&(e[c]=!0);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b);for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),void 0!==d&&(e[c]=d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}}),a.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."};var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);return e.is(b)?d.apply(e,arguments):void 0})}})});
(function($){
"use strict";
jQuery(document).ready(function(){
var ul=jQuery('li.mega').find('> ul');
jQuery(ul).addClass('mega');
});
jQuery(document).ready(function(){
jQuery(".w_toggle").toggle(function(){
jQuery(".w_toparea").show(400);
jQuery('.w_toggle').addClass('open');
},
function(){
jQuery(".w_toparea").hide(400);
jQuery('.w_toggle').removeClass('open');
});
});
jQuery(document).ready(function(){
jQuery('#nav li.current-menu-item, #nav li.current_page_item, #side-nav li.current_page_item, #nav li.current-menu-ancestor, #nav li ul li ul li.current-menu-item').addClass('current');
jQuery('#nav li ul li:has(ul)').addClass('submenux');
});
(function(){
var $window=$(window),
nav_height=jQuery('#nav-wrap').outerHeight();
jQuery('#nav').find('a').each(function(){
var $this=jQuery(this),
href=$this.attr('href');
if(href&&href.indexOf('#')!==-1&&href!='#'){
var id=href.substring(href.indexOf('#')),
section=$(id);
if(section.length > 0){
$window.on('resize scroll', function(){
var section_top=section.offset().top - nav_height,
section_height=section.outerHeight();
if($window.scrollTop() >=section_top&&$window.scrollTop() < (section_top + section_height)){
$this.parent().siblings().removeClass('active').end().addClass('active');
}});
}}
});
})();
jQuery(document).ready(function(){
jQuery(window).scroll(function(){
if(jQuery(this).scrollTop() > 100){
jQuery('.scrollup').fadeIn();
}else{
jQuery('.scrollup').fadeOut();
}});
jQuery('.scrollup').click(function(){
jQuery("html, body").animate({ scrollTop: 0 }, 700);
return false;
});
jQuery(function(){
jQuery('#nav a[href*=#]:not([href=#]), .max-hero a.button').click(function(){
if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){
var target=jQuery(this.hash);
target=target.length ? target:jQuery('[name=' + this.hash.slice(1) +']');
if(target.length){
jQuery('html,body').animate({
scrollTop: target.offset().top
}, 700);
return false;
}}
});
});
});
jQuery(document).ready(function($){
jQuery("#toggle-icon").toggle(function(){
jQuery("#header.vertical-w").fadeIn(350);
jQuery(".vertical-socials").fadeOut(350);
jQuery(this).addClass('active');
jQuery('#vertical-header-wrapper').animate({ 'left': 0 },350);
},
function(){
jQuery("#header.vertical-w").fadeOut(350);
jQuery(".vertical-socials").fadeIn(350);
jQuery(this).removeClass('active');
jQuery('#vertical-header-wrapper').animate({ 'left': -250 },350);
});
});
jQuery(document).ready(function($){
jQuery('#nav-wrap').prepend('');
jQuery("#menu-icon").on("click", function(){
jQuery("#nav-wrap #nav").fadeToggle();
jQuery(this).toggleClass("active");
});
});
jQuery(document).ready(function($){
if(navigator.userAgent.match(/IEMobile\/10\.0/)){
var msViewportStyle=document.createElement("style");
msViewportStyle.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}"
)
);
document.getElementsByTagName("head")[0].
appendChild(msViewportStyle);
jQuery('ul#nav').addClass('ie10mfx');
}});
jQuery(document).ready(function($){
var deviceAgent=navigator.userAgent.toLowerCase();
var agentID=deviceAgent.match(/(iphone|ipod|ipad)/);
if(agentID){
var width=jQuery(window).width();
if(width > 768){
if(jQuery('#nav li:has(ul)').length){
jQuery('#nav li:has(ul)').doubleTapToGo();
}}
}else{
jQuery('#nav li:has(ul)').doubleTapToGo();
}});
(function(){
var $container=jQuery('.acc-container'),
$trigger=jQuery('.acc-trigger');
$container.hide();
$trigger.first().addClass('active').next().show();
var fullWidth=$container.outerWidth(true);
$trigger.css('width', fullWidth);
$container.css('width', fullWidth);
$trigger.on('click', function(e){
if(jQuery(this).next().is(':hidden')){
$trigger.removeClass('active').next().slideUp(300);
jQuery(this).toggleClass('active').next().slideDown(300);
}
e.preventDefault();
});
jQuery(window).on('resize', function(){
fullWidth=$container.outerWidth(true)
$trigger.css('width', $trigger.parent().width());
$container.css('width', $container.parent().width());
});
})();
jQuery(document).ready(function(){
jQuery("#contact-form").validate({
rules: {
cName: {
required: true,
minlength: 3
},
cEmail: {
required: true,
email: true
},
cMessage: {
required: true
}},
messages: {
cName: {
required: "Your name is mandatory",
minlength: jQuery.validator.format("Your name must have at least {0} characters.")
},
cEmail: {
required: "Need an email address",
email: "The email address must be valid"
},
cMessage: {
required: "Message is mandatory",
}},
onsubmit: true,
errorClass: "bad-field",
validClass: "good-field",
errorElement: "span",
errorPlacement: function(error, element){
if(element.parent('.field-group').length){
error.insertAfter(element.siblings('h5'));
}else{
error.insertBefore(element);
}}
});
});
jQuery(document).ready(function(){
jQuery('.search-form-icon').click(function(){
jQuery('.search-form-box').addClass('show-sbox');
jQuery('#search-box').focus();
});
jQuery(document).click(function(ev){
var myID=ev.target.id;
if((myID!='searchbox-icon')&&myID!='search-box'){
jQuery('.search-form-box').removeClass('show-sbox');
}});
});
jQuery(document).ready(function(){
if(jQuery('#our-clients.crsl').length){
jQuery('#our-clients.crsl').jcarousel({
auto: 2,
wrap: 'last',
});
}
if(jQuery('#latest-projects').length){
jQuery('#latest-projects').jcarousel({
scroll: 1
});
}});
jQuery(document).ready(function(){
if(jQuery('.pie').length){
jQuery('.pie').easyPieChart({
barColor:'#ff9900',
trackColor: '#f2f2f2',
scaleColor: false,
lineWidth:20,
animate: 1000,
onStep: function(value){
this.$el.find('span').text(~~value+1);
}});
}});
initProgress('.progress');
function initProgress(el){
jQuery(el).each(function(){
var pData=jQuery(this).data('progress');
progress(pData,jQuery(this));
});
}
function progress(percent, $element){
var progressBarWidth=0;
(function myLoop (i,max){
progressBarWidth=i * $element.width() / 100;
setTimeout(function (){
$element.find('div').find('small').html(i+'%');
$element.find('div').width(progressBarWidth);
if(++i<=max) myLoop(i,max);
}, 10)
})(0,percent);
}
jQuery(window).load(function(){
jQuery('.flexslider').flexslider();
});
jQuery(document).ready(function($){
var lightboxArgs={
animation_speed: 'fast',
autoplay_slideshow: false,
slideshow: 5000,
theme: 'pp_default',
opacity: 0.8,
show_title: false,
social_tools: "",
deeplinking: false,
allow_resize: true,
counter_separator_label: '/',
default_width: 940,
default_height: 529
};
if(jQuery('.portfolio a[href$=jpg], .portfolio a[href$=JPG], .portfolio a[href$=jpeg], .portfolio a[href$=JPEG], .portfolio a[href$=png], .portfolio a[href$=gif], .portfolio a[href$=bmp]:has(img)').length){
jQuery('.portfolio a[href$=jpg], .portfolio a[href$=JPG], .portfolio a[href$=jpeg], .portfolio a[href$=JPEG], .portfolio a[href$=png], .portfolio a[href$=gif], .portfolio a[href$=bmp]:has(img)').prettyPhoto(lightboxArgs);
}});
jQuery(window).load(function(){
var $container=jQuery('.portfolio');
$container.isotope({
filter: '*',
animationOptions: {
duration: 750,
easing: 'linear',
queue: false,
}});
jQuery('nav.primary .portfolioFilters a').click(function(){
var selector=jQuery(this).attr('data-filter');
$container.isotope({
filter: selector,
animationOptions: {
duration: 750,
easing: 'linear',
queue: false,
}});
return false;
});
var $optionSets=jQuery('nav.primary .portfolioFilters'),
$optionLinks=$optionSets.find('a');
$optionLinks.click(function(){
var $this=jQuery(this);
if($this.hasClass('selected')){
return false;
}
var $optionSet=$this.parents('nav.primary .portfolioFilters');
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');
});
});
jQuery(window).load(function(){
if(jQuery('#pin-content').length){
jQuery('#pin-content').masonry({
itemSelector: '.pin-box',
}).imagesLoaded(function(){
jQuery('#pin-content').data('masonry');
});
}});
jQuery('.max-hero').superslides({
animation: 'fade'
});
jQuery(document).ready(function(){
jQuery("#wrap").fitVids();
});
(function($){
'use strict';
jQuery(document).ready(function(){
jQuery(window).bind('load', function (){
parallaxInit();
});
function parallaxInit(){
testMobile=isMobile.any();
if(testMobile==null){
jQuery('.sparallax .slide1').parallax("50%", 0.2);
jQuery('.sparallax .slide2').parallax("50%", 0.2);
jQuery('.sparallax .slide3').parallax("50%", 0.2);
jQuery('.sparallax .slide4').parallax("50%", 0.2);
jQuery('.sparallax .slide5').parallax("50%", 0.2);
jQuery('.sparallax .slide6').parallax("50%", 0.2);
}}
parallaxInit();
});
var testMobile;
var isMobile={
Android: function(){
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function(){
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function(){
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function(){
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function(){
return navigator.userAgent.match(/IEMobile/i);
},
any: function(){
return (isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()||isMobile.Opera()||isMobile.Windows());
}};}(jQuery));
(function($, undefined){
'use strict';
$(function(){
$('.countdown-w').each(function(){
var days=$('.days-w .count-w', this);
var hours=$('.hours-w .count-w', this);
var minutes=$('.minutes-w .count-w', this);
var seconds=$('.seconds-w .count-w', this);
var until=parseInt($(this).data('until'), 10);
var done=$(this).data('done');
var self=$(this);
var updateTime=function(){
var now=Math.round((+new Date()) / 1000);
var left=Math.abs(until-now) ;
seconds.text(left%60);
left=Math.floor(left/60);
minutes.text(left%60);
left=Math.floor(left/60);
hours.text(left%24);
left=Math.floor(left/24);
days.text(left);
};
var interval=setInterval(updateTime, 1000);
});
});
})(jQuery);
(function($){
"use strict";
jQuery(document).ready(function(){
jQuery('.max-counter').each(function(i, el){
var counter=jQuery(el).data('counter');
if(jQuery(el).visible(true)&&!jQuery(el).hasClass('counted')){
setTimeout(function (){
jQuery(el).addClass('counted');
jQuery(el).find('.max-count').countTo({
from: 0,
to: counter,
speed: 2000,
refreshInterval: 100
});
}, 1000);
}});
var win=jQuery(window),
allMods=jQuery(".max-counter");
win.scroll(function(event){
allMods.each(function(i, el){
var el=jQuery(el),
effecttype=el.data('effecttype');
if(effecttype==='counter'){
var counter=el.data('counter');
if(el.visible(true)&&!jQuery(el).hasClass('counted')){
el.addClass('counted');
el.find('.max-count').countTo({
from: 0,
to: counter,
speed: 2000,
refreshInterval: 100
});
}}
});
});
});
$.fn.countTo=function (options){
options=options||{};
return jQuery(this).each(function (){
var settings=$.extend({}, $.fn.countTo.defaults, {
from: jQuery(this).data('from'),
to: jQuery(this).data('to'),
speed: jQuery(this).data('speed'),
refreshInterval: jQuery(this).data('refresh-interval'),
decimals: jQuery(this).data('decimals')
}, options);
var loops=Math.ceil(settings.speed / settings.refreshInterval),
increment=(settings.to - settings.from) / loops;
var self=this,
$self=jQuery(this),
loopCount=0,
value=settings.from,
data=$self.data('countTo')||{};
$self.data('countTo', data);
if(data.interval){
clearInterval(data.interval);
}
data.interval=setInterval(updateTimer, settings.refreshInterval);
render(value);
function updateTimer(){
value +=increment;
loopCount++;
render(value);
if(typeof(settings.onUpdate)=='function'){
settings.onUpdate.call(self, value);
}
if(loopCount >=loops){
$self.removeData('countTo');
clearInterval(data.interval);
value=settings.to;
if(typeof(settings.onComplete)=='function'){
settings.onComplete.call(self, value);
}}
}
function render(value){
var formattedValue=settings.formatter.call(self, value, settings);
$self.html(formattedValue);
}});
};
$.fn.countTo.defaults={
from: 0,
to: 0,
speed: 1000,
refreshInterval: 100,
decimals: 0,
formatter: formatter,
onUpdate: null,
onComplete: null
};
function formatter(value, settings){
return value.toFixed(settings.decimals);
}})(jQuery);
jQuery('.widget-tabs').each(function(){
jQuery(this).find(".tab_content").hide();
if(document.location.hash&&jQuery(this).find("ul.tabs li a[href='"+document.location.hash+"']").length >=1){
jQuery(this).find("ul.tabs li a[href='"+document.location.hash+"']").parent().addClass("active").show();
jQuery(this).find(document.location.hash+".tab_content").show();
}else{
jQuery(this).find("ul.tabs li:first").addClass("active").show();
jQuery(this).find(".tab_content:first").show();
}});
jQuery("ul.tabs li").click(function(e){
jQuery(this).parents('.widget-tabs').find("ul.tabs li").removeClass("active");
jQuery(this).addClass("active");
jQuery(this).parents('.widget-tabs').find(".tab_content").hide();
var activeTab=jQuery(this).find("a").attr("href");
jQuery(this).parents('.widget-tabs').find(activeTab).fadeIn();
e.preventDefault();
});
jQuery(function(){
jQuery("#social-media a").hover(function(){
jQuery("#social-media").addClass(jQuery(this).data("network")).addClass("active");
},
function(){
jQuery("#social-media").removeClass("active facebook twitter vimeo dribble youtube pinterest google linkedin rss instagram skype other-social");
}
);
});
jQuery(function(){
if(jQuery('.parallax-sec').hasClass('page-title-x')){
jQuery.stellar({
horizontalScrolling: false,
responsive: false,
hideDistantElements: false,
});
}else{
jQuery.stellar({
horizontalScrolling: false,
responsive: true,
hideDistantElements: false,
});
}});
function updateShoppingCart(){
"use strict";
jQuery('body').bind('added_to_cart', add_to_cart);
function add_to_cart(event, parts, hash){
var miniCart=jQuery('.woo-cart-header');
if(parts['div.widget-woo-cart-content']){
var $cartContent=jQuery(parts['div.widget-woo-cart-content']),
$itemsList=$cartContent .find('.cart-list'),
$total=$cartContent.find('.total').contents(':not(strong)').text();
miniCart.find('.woo-cart-dropdown').html('').append($itemsList);
miniCart.find('.total span').html('').append($total);
}}
}
document.createElement("article");
document.createElement("section");
})(jQuery);
(function($){
$.fn.evo_cal_functions=function(O){
el=this;
switch(O.return){
case 'load_shortcodes':
return el.find('.evo_cal_data').data('sc');
break;
case 'update_shortcodes':
el.find('.evo_cal_data').data('sc', O.SC);
break;
}};
$.fn.evo_countdown_get=function(opt){
var defaults={ gap:''};
var OPT=$.extend({}, defaults, opt);
distance=(OPT.gap * 1000);
var days=Math.floor(distance / (1000 * 60 * 60 * 24));
var hours=Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes=Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds=Math.floor((distance % (1000 * 60)) / 1000);
minutes=minutes<10? '0'+minutes:minutes;
seconds=seconds<10? '0'+seconds:seconds;
return {
'd': days,
'h':hours,
'm':minutes,
's':seconds
};};
$.fn.evo_countdown=function(opt){
var defaults={ S1:''};
var OPT=$.extend({}, defaults, opt);
var el=$(this);
var gap=parseInt(el.data('gap'));
const text=el.data('t');
if(text===undefined) text='';
if(el.hasClass('evo_cd_on')) return;
if(gap > 0){
dd=el.evo_countdown_get({ 'gap': gap});
el.html(( dd.d>0 ? dd.d + "d ":'') + dd.h + ":" + dd.m +':'+ dd.s +' '+text);
el.data('gap', (gap -1));
var duration=el.data('dur');
el.addClass('evo_cd_on');
var CD=setInterval(function(){
gap=el.data('gap');
duration=el.data('dur');
if(gap > 0){
if(duration!==undefined&&el.siblings('.evo_ep_bar').length){
perc=((duration - gap)/ duration) * 100;
el.siblings('.evo_ep_bar').find('b').css('width',perc+'%');
}
dd=el.evo_countdown_get({ 'gap': gap});
el.html(( dd.d>0 ? dd.d + "d ":'') + dd.h + ":" + dd.m +':'+ dd.s +' '+text);
el.data('gap',(gap - 1));
}else{
const expire_timer_action=el.data('exp_act');
if(expire_timer_action!==undefined){
$('body').trigger('runajax_refresh_now_cal',[
el ,
el.data('n'),
]);
}
const _complete_text=el.evo_get_txt({V:'event_completed'});
if(el.siblings('.evo_ep_bar').length){
el.siblings('.evo_ep_bar').addClass('evo_completed');
el.siblings('.evo_ep_pre').html(_complete_text);
}
if(el.closest('.evcal_desc').length){
el.closest('.evcal_desc').find('.eventover').html(_complete_text);
el.closest('.evcal_desc').find('.evo_live_now').remove();
}
if(el.closest('.eventon_list_event').length){
el.closest('.eventon_list_event').find('span.evo_live_now').hide();
}
el.html('');
clearInterval(CD);
}},1000);
}else{
clearInterval(CD);
}};
$.fn.evo_get_global=function(opt){
var defaults={ S1:'', S2:''};
var OPT=$.extend({}, defaults, opt);
var BUS=$('#evo_global_data').data('d');
if(!(OPT.S1 in BUS)) return false;
if(!(OPT.S2 in BUS[OPT.S1])) return false;
return BUS[OPT.S1][OPT.S2];
}
$.fn.evo_get_txt=function(opt){
var defaults={ V:''}
var OPT=$.extend({}, defaults, opt);
var BUS=$('#evo_global_data').data('d');
if(!('txt' in BUS)) return false;
if(!(OPT.V in BUS.txt)) return false;
return BUS.txt[OPT.V];
}
$.fn.evo_get_cal_def=function(opt){
var defaults={ V:''}
var OPT=$.extend({}, defaults, opt);
var BUS=$('#evo_global_data').data('d');
if(!('cal_def' in BUS)) return false;
if(!(OPT.V in BUS.cal_def)) return false;
return BUS.cal_def[OPT.V];
}
$.fn.evo_HB_process_template=function(opt){
var defaults={ TD:'', part:''}
var OPT=$.extend({}, defaults, opt);
BUS=$('#evo_global_data').data('d');
template=Handlebars.compile(BUS.temp[ OPT.part ]);
return template(OPT.TD);
}
$.fn.evo_cal_events_in_range=function(opt){
var defaults={ S:'', E:'', hide: true,
closeEC:true,
showEV: false,
showEVL: false,
showAllEvs: false
};
var OPT=$.extend({}, defaults, opt);
var CAL=$(this);
eJSON=CAL.find('.evo_cal_events').data('events');
R={};
html='';
json={};
show=0;
$.each(eJSON, function(ind, ED){
eO=CAL.find('#event_'+ ED._ID);
if(eO===undefined||eO.length==0) return;
if(OPT.hide) eO.hide();
this_show=false;
if(ED.month_long||ED.year_long){
this_show=true;
}else{
if(CAL.evo_is_in_range({
'S': OPT.S, 'E': OPT.E, 'start': ED.event_start_unix , 'end':ED.event_end_unix
})){
this_show=true;
}}
if(OPT.showAllEvs) this_show=true;
if(this_show){
if(OPT.showEV) eO.show();
if(OPT.closeEC&&SC.evc_open=='no') eO.find('.event_description').hide().removeClass('open');
html +=eO[0].outerHTML;
json[ ED._ID]=ED;
show++;
}});
if(OPT.showEV){
tx_noevents=CAL.evo_get_txt({V:'no_events'});
EL=CAL.find('.eventon_events_list');
EL.find('.eventon_list_event.no_events').remove();
if(show==0)
EL.append('');
}
if(OPT.showEVL){
CAL.find('.eventon_events_list').show().removeClass('evo_hide');
}
R['count']=show;
R['html']=html;
R['json']=json;
return R;
}
$.fn.evo_is_in_range=function(opt){
var defaults={ S:'', E:'', start:'',end:''}
var OPT=$.extend({}, defaults, opt);
S=parseInt(OPT.S);
E=parseInt(OPT.E);
start=parseInt(OPT.start);
end=parseInt(OPT.end);
return (
(start <=S&&end >=E) ||
(start <=S&&end >=S&&end <=E) ||
(start <=E&&end >=E) ||
(start >=S&&end <=E)
) ? true: false;
}
$.fn.evo_cal_hide_events=function(){
CAL=$(this);
CAL.find('.eventon_list_event').hide();
}
$.fn.evo_day_in_month=function(opt){
var defaults={ M:'', Y:''}
var OPT=$.extend({}, defaults, opt);
return new Date(OPT.Y, OPT.M, 0).getDate();
}
$.fn.evo_get_day_name_index=function(opt){
var defaults={ M:'', Y:'', D:''}
var OPT=$.extend({}, defaults, opt);
return new Date(Date.UTC(OPT.Y, OPT.M-1, OPT.D)).getUTCDay();
}
$.fn.evo_prepare_lb=function(){
$(this).find('.evo_lightbox_body').html('');
}
$.fn.evo_show_lb=function(opt){
var defaults={ RTL:'', calid:''}
var OPT=$.extend({}, defaults, opt);
$(this).addClass('show '+ OPT.RTL).attr('data-cal_id', OPT.calid);
$('body').trigger('evolightbox_show');
}
$.fn.evo_append_lb=function(opt){
var defaults={ C:''}
var OPT=$.extend({}, defaults, opt);
$(this).find('.evo_lightbox_body').html(OPT.C);
}
$.fn.evo_update_sc_from_filters=function(){
var ev_cal=$(this);
SC=ev_cal.find('.evo_cal_data').data('sc');
var filter_section=ev_cal.find('.eventon_filter_line');
filter_section.find('.eventon_filter').each(function(index){
O=$(this);
var filter_val=O.data('filter_val');
filter_val=filter_val==''? 'NOT-all': filter_val;
ADD=(O.data('fl_o')&&O.data('fl_o')!='IN')? O.data('fl_o')+'-': '';
SC[ O.data('filter_field') ]=ADD + filter_val;
});
ev_cal.find('.evo_cal_data').data('sc', SC);
}
$.fn.evo_shortcode_data=function(){
var ev_cal=$(this);
return ev_cal.find('.evo_cal_data').data('sc');
}
$.fn.evo_get_sc_val=function(opt){
var defaults={ F:''}
var OPT=$.extend({}, defaults, opt);
var ev_cal=$(this);
if(OPT.F=='') return false;
SC=ev_cal.find('.evo_cal_data').data('sc');
if(!(SC[ OPT.F])) return false;
return SC[ OPT.F];
}
$.fn.evo_update_cal_sc=function(opt){
var defaults={
F:'', V:''
}
var OPT=$.extend({}, defaults, opt);
var ev_cal=$(this);
SC=ev_cal.find('.evo_cal_data').data('sc');
SC[ OPT.F ]=OPT.V;
ev_cal.find('.evo_cal_data').data('sc', SC);
}
$.fn.evo_update_all_cal_sc=function(opt){
var defaults={SC:''}
var OPT=$.extend({}, defaults, opt);
var CAL=$(this);
CAL.find('.evo_cal_data').data('sc', OPT.SC);
}
$.fn.evo_is_hex_dark=function(opt){
var defaults={ hex:'808080'}
var OPT=$.extend({}, defaults, opt);
hex=OPT.hex;
var c=hex.replace('#','');
var is_hex=typeof c==='string'&&c.length===6&&!isNaN(Number('0x' + c));
if(is_hex){
var values=c.split('');
r=parseInt(values[0].toString() + values[1].toString(), 16);
g=parseInt(values[2].toString() + values[3].toString(), 16);
b=parseInt(values[4].toString() + values[5].toString(), 16);
}else{
var vals=c.substring(c.indexOf('(') +1, c.length -1).split(', ');
var r=vals[0]
var g=vals[1];
var b=vals[2];
}
var luma=((r * 299) + (g * 587) + (b * 114)) / 1000;
return luma>155? true:false;
}
$.fn.evo_get_OD=function(){
var ev_cal=$(this);
return ev_cal.find('.evo_cal_data').data('od');
}
$.fn.evoGetFilters=function(){
var ev_cal=$(this);
var evodata=ev_cal.find('.evo-data');
var filters_on=(evodata.attr('data-filters_on')=='true')?'true':'false';
if(filters_on=='true'){
var filter_section=ev_cal.find('.eventon_filter_line');
var filter_array=[];
filter_section.find('.eventon_filter').each(function(index){
var filter_val=$(this).attr('data-filter_val');
if(filter_val!='all'){
var filter_ar={};
filter_ar['filter_type']=$(this).attr('data-filter_type');
filter_ar['filter_name']=$(this).attr('data-filter_field');
if($(this).attr('data-fl_o')=='NOT'){
filter_ar['filter_op']='NOT IN';
}
filter_ar['filter_val']=filter_val;
filter_array.push(filter_ar);
}});
}else{
var filter_array='';
}
return filter_array;
}
$.fn.evo_item_shortcodes=function(){
var OBJ=$(this);
var shortcode_array={};
OBJ.each(function(){
$.each(this.attributes, function(i, attrib){
var name=attrib.name;
if(attrib.name!='class'&&attrib.name!='style'&&attrib.value!=''){
name__=attrib.name.split('-');
shortcode_array[name__[1]]=attrib.value;
}});
});
return shortcode_array;
}
$.fn.evo_shortcodes=function(){
var ev_cal=$(this);
var shortcode_array={};
ev_cal.find('.cal_arguments').each(function(){
$.each(this.attributes, function(i, attrib){
var name=attrib.name;
if(attrib.name!='class'&&attrib.name!='style'&&attrib.value!=''){
name__=attrib.name.split('-');
shortcode_array[name__[1]]=attrib.value;
}});
});
return shortcode_array;
}
$.fn.evo_getevodata=function(){
var ev_cal=$(this);
var evoData={};
ev_cal.find('.evo-data').each(function(){
$.each(this.attributes, function(i, attrib){
var name=attrib.name;
if(attrib.name!='class'&&attrib.name!='style'){
name__=attrib.name.split('-');
evoData[name__[1]]=attrib.value;
}});
});
return evoData;
}
$.fn.evo_loader_animation=function(opt){
var defaults={
direction:'start'
}
var OPT=$.extend({}, defaults, opt);
if(OPT.direction=='start'){
$(this).find('#eventon_loadbar').slideDown();
}else{
$(this).find('#eventon_loadbar').slideUp();
}}
}(jQuery));
jQuery.easing['jswing']=jQuery.easing['swing'];
jQuery.extend(jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d){
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d){
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d){
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d){
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d){
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d){
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d){
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d){
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d){
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d){
return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d){
return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d){
if(t==0) return b;
if(t==d) return b+c;
if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d){
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d){
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d){
if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
},
easeOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d)==1) return b+c; if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b;
},
easeInOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b; if((t/=d/2)==2) return b+c; if(!p) p=d*(.3*1.5);
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d){
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d){
if((t/=d) < (1/2.75)){
return c*(7.5625*t*t) + b;
}else if(t < (2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
}else if(t < (2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}},
easeInOutBounce: function (x, t, b, c, d){
if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}});
(function webpackUniversalModuleDefinition(root, factory){
if(typeof exports==='object'&&typeof module==='object')
module.exports=factory();
else if(typeof define==='function'&&define.amd)
define([], factory);
else if(typeof exports==='object')
exports["Handlebars"]=factory();
else
root["Handlebars"]=factory();
})(this, function(){
return (function(modules){
var installedModules={};
function __webpack_require__(moduleId){
if(installedModules[moduleId])
return installedModules[moduleId].exports;
var module=installedModules[moduleId]={
exports: {},
id: moduleId,
loaded: false
};
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
module.loaded=true;
return module.exports;
}
__webpack_require__.m=modules;
__webpack_require__.c=installedModules;
__webpack_require__.p="";
return __webpack_require__(0);
})
([
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _handlebarsRuntime=__webpack_require__(2);
var _handlebarsRuntime2=_interopRequireDefault(_handlebarsRuntime);
var _handlebarsCompilerAst=__webpack_require__(35);
var _handlebarsCompilerAst2=_interopRequireDefault(_handlebarsCompilerAst);
var _handlebarsCompilerBase=__webpack_require__(36);
var _handlebarsCompilerCompiler=__webpack_require__(41);
var _handlebarsCompilerJavascriptCompiler=__webpack_require__(42);
var _handlebarsCompilerJavascriptCompiler2=_interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
var _handlebarsCompilerVisitor=__webpack_require__(39);
var _handlebarsCompilerVisitor2=_interopRequireDefault(_handlebarsCompilerVisitor);
var _handlebarsNoConflict=__webpack_require__(34);
var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);
var _create=_handlebarsRuntime2['default'].create;
function create(){
var hb=_create();
hb.compile=function (input, options){
return _handlebarsCompilerCompiler.compile(input, options, hb);
};
hb.precompile=function (input, options){
return _handlebarsCompilerCompiler.precompile(input, options, hb);
};
hb.AST=_handlebarsCompilerAst2['default'];
hb.Compiler=_handlebarsCompilerCompiler.Compiler;
hb.JavaScriptCompiler=_handlebarsCompilerJavascriptCompiler2['default'];
hb.Parser=_handlebarsCompilerBase.parser;
hb.parse=_handlebarsCompilerBase.parse;
return hb;
}
var inst=create();
inst.create=create;
_handlebarsNoConflict2['default'](inst);
inst.Visitor=_handlebarsCompilerVisitor2['default'];
inst['default']=inst;
exports['default']=inst;
module.exports=exports['default'];
}),
(function(module, exports){
"use strict";
exports["default"]=function (obj){
return obj&&obj.__esModule ? obj:{
"default": obj
};};
exports.__esModule=true;
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireWildcard=__webpack_require__(3)['default'];
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _handlebarsBase=__webpack_require__(4);
var base=_interopRequireWildcard(_handlebarsBase);
var _handlebarsSafeString=__webpack_require__(21);
var _handlebarsSafeString2=_interopRequireDefault(_handlebarsSafeString);
var _handlebarsException=__webpack_require__(6);
var _handlebarsException2=_interopRequireDefault(_handlebarsException);
var _handlebarsUtils=__webpack_require__(5);
var Utils=_interopRequireWildcard(_handlebarsUtils);
var _handlebarsRuntime=__webpack_require__(22);
var runtime=_interopRequireWildcard(_handlebarsRuntime);
var _handlebarsNoConflict=__webpack_require__(34);
var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);
function create(){
var hb=new base.HandlebarsEnvironment();
Utils.extend(hb, base);
hb.SafeString=_handlebarsSafeString2['default'];
hb.Exception=_handlebarsException2['default'];
hb.Utils=Utils;
hb.escapeExpression=Utils.escapeExpression;
hb.VM=runtime;
hb.template=function (spec){
return runtime.template(spec, hb);
};
return hb;
}
var inst=create();
inst.create=create;
_handlebarsNoConflict2['default'](inst);
inst['default']=inst;
exports['default']=inst;
module.exports=exports['default'];
}),
(function(module, exports){
"use strict";
exports["default"]=function (obj){
if(obj&&obj.__esModule){
return obj;
}else{
var newObj={};
if(obj!=null){
for (var key in obj){
if(Object.prototype.hasOwnProperty.call(obj, key)) newObj[key]=obj[key];
}}
newObj["default"]=obj;
return newObj;
}};
exports.__esModule=true;
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.HandlebarsEnvironment=HandlebarsEnvironment;
var _utils=__webpack_require__(5);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _helpers=__webpack_require__(10);
var _decorators=__webpack_require__(18);
var _logger=__webpack_require__(20);
var _logger2=_interopRequireDefault(_logger);
var VERSION='4.4.3';
exports.VERSION=VERSION;
var COMPILER_REVISION=8;
exports.COMPILER_REVISION=COMPILER_REVISION;
var LAST_COMPATIBLE_COMPILER_REVISION=7;
exports.LAST_COMPATIBLE_COMPILER_REVISION=LAST_COMPATIBLE_COMPILER_REVISION;
var REVISION_CHANGES={
1: '<=1.0.rc.2',
2: '==1.0.0-rc.3',
3: '==1.0.0-rc.4',
4: '==1.x.x',
5: '==2.0.0-alpha.x',
6: '>=2.0.0-beta.1',
7: '>=4.0.0 <4.3.0',
8: '>=4.3.0'
};
exports.REVISION_CHANGES=REVISION_CHANGES;
var objectType='[object Object]';
function HandlebarsEnvironment(helpers, partials, decorators){
this.helpers=helpers||{};
this.partials=partials||{};
this.decorators=decorators||{};
_helpers.registerDefaultHelpers(this);
_decorators.registerDefaultDecorators(this);
}
HandlebarsEnvironment.prototype={
constructor: HandlebarsEnvironment,
logger: _logger2['default'],
log: _logger2['default'].log,
registerHelper: function registerHelper(name, fn){
if(_utils.toString.call(name)===objectType){
if(fn){
throw new _exception2['default']('Arg not supported with multiple helpers');
}
_utils.extend(this.helpers, name);
}else{
this.helpers[name]=fn;
}},
unregisterHelper: function unregisterHelper(name){
delete this.helpers[name];
},
registerPartial: function registerPartial(name, partial){
if(_utils.toString.call(name)===objectType){
_utils.extend(this.partials, name);
}else{
if(typeof partial==='undefined'){
throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
}
this.partials[name]=partial;
}},
unregisterPartial: function unregisterPartial(name){
delete this.partials[name];
},
registerDecorator: function registerDecorator(name, fn){
if(_utils.toString.call(name)===objectType){
if(fn){
throw new _exception2['default']('Arg not supported with multiple decorators');
}
_utils.extend(this.decorators, name);
}else{
this.decorators[name]=fn;
}},
unregisterDecorator: function unregisterDecorator(name){
delete this.decorators[name];
}};
var log=_logger2['default'].log;
exports.log=log;
exports.createFrame=_utils.createFrame;
exports.logger=_logger2['default'];
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
exports.extend=extend;
exports.indexOf=indexOf;
exports.escapeExpression=escapeExpression;
exports.isEmpty=isEmpty;
exports.createFrame=createFrame;
exports.blockParams=blockParams;
exports.appendContextPath=appendContextPath;
var escape={
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": ''',
'`': '`',
'=': '='
};
var badChars=/[&<>"'`=]/g,
possible=/[&<>"'`=]/;
function escapeChar(chr){
return escape[chr];
}
function extend(obj ){
for (var i=1; i < arguments.length; i++){
for (var key in arguments[i]){
if(Object.prototype.hasOwnProperty.call(arguments[i], key)){
obj[key]=arguments[i][key];
}}
}
return obj;
}
var toString=Object.prototype.toString;
exports.toString=toString;
var isFunction=function isFunction(value){
return typeof value==='function';
};
if(isFunction(/x/)){
exports.isFunction=isFunction=function (value){
return typeof value==='function'&&toString.call(value)==='[object Function]';
};}
exports.isFunction=isFunction;
var isArray=Array.isArray||function (value){
return value&&typeof value==='object' ? toString.call(value)==='[object Array]':false;
};
exports.isArray=isArray;
function indexOf(array, value){
for (var i=0, len=array.length; i < len; i++){
if(array[i]===value){
return i;
}}
return -1;
}
function escapeExpression(string){
if(typeof string!=='string'){
if(string&&string.toHTML){
return string.toHTML();
}else if(string==null){
return '';
}else if(!string){
return string + '';
}
string='' + string;
}
if(!possible.test(string)){
return string;
}
return string.replace(badChars, escapeChar);
}
function isEmpty(value){
if(!value&&value!==0){
return true;
}else if(isArray(value)&&value.length===0){
return true;
}else{
return false;
}}
function createFrame(object){
var frame=extend({}, object);
frame._parent=object;
return frame;
}
function blockParams(params, ids){
params.path=ids;
return params;
}
function appendContextPath(contextPath, id){
return (contextPath ? contextPath + '.':'') + id;
}
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$defineProperty=__webpack_require__(7)['default'];
exports.__esModule=true;
var errorProps=['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
function Exception(message, node){
var loc=node&&node.loc,
line=undefined,
column=undefined;
if(loc){
line=loc.start.line;
column=loc.start.column;
message +=' - ' + line + ':' + column;
}
var tmp=Error.prototype.constructor.call(this, message);
for (var idx=0; idx < errorProps.length; idx++){
this[errorProps[idx]]=tmp[errorProps[idx]];
}
if(Error.captureStackTrace){
Error.captureStackTrace(this, Exception);
}
try {
if(loc){
this.lineNumber=line;
if(_Object$defineProperty){
Object.defineProperty(this, 'column', {
value: column,
enumerable: true
});
}else{
this.column=column;
}}
} catch (nop){
}}
Exception.prototype=new Error();
exports['default']=Exception;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
module.exports={ "default": __webpack_require__(8), __esModule: true };
}),
(function(module, exports, __webpack_require__){
var $=__webpack_require__(9);
module.exports=function defineProperty(it, key, desc){
return $.setDesc(it, key, desc);
};
}),
(function(module, exports){
var $Object=Object;
module.exports={
create: $Object.create,
getProto: $Object.getPrototypeOf,
isEnum: {}.propertyIsEnumerable,
getDesc: $Object.getOwnPropertyDescriptor,
setDesc: $Object.defineProperty,
setDescs: $Object.defineProperties,
getKeys: $Object.keys,
getNames: $Object.getOwnPropertyNames,
getSymbols: $Object.getOwnPropertySymbols,
each: [].forEach
};
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.registerDefaultHelpers=registerDefaultHelpers;
exports.moveHelperToHooks=moveHelperToHooks;
var _helpersBlockHelperMissing=__webpack_require__(11);
var _helpersBlockHelperMissing2=_interopRequireDefault(_helpersBlockHelperMissing);
var _helpersEach=__webpack_require__(12);
var _helpersEach2=_interopRequireDefault(_helpersEach);
var _helpersHelperMissing=__webpack_require__(13);
var _helpersHelperMissing2=_interopRequireDefault(_helpersHelperMissing);
var _helpersIf=__webpack_require__(14);
var _helpersIf2=_interopRequireDefault(_helpersIf);
var _helpersLog=__webpack_require__(15);
var _helpersLog2=_interopRequireDefault(_helpersLog);
var _helpersLookup=__webpack_require__(16);
var _helpersLookup2=_interopRequireDefault(_helpersLookup);
var _helpersWith=__webpack_require__(17);
var _helpersWith2=_interopRequireDefault(_helpersWith);
function registerDefaultHelpers(instance){
_helpersBlockHelperMissing2['default'](instance);
_helpersEach2['default'](instance);
_helpersHelperMissing2['default'](instance);
_helpersIf2['default'](instance);
_helpersLog2['default'](instance);
_helpersLookup2['default'](instance);
_helpersWith2['default'](instance);
}
function moveHelperToHooks(instance, helperName, keepHelper){
if(instance.helpers[helperName]){
instance.hooks[helperName]=instance.helpers[helperName];
if(!keepHelper){
delete instance.helpers[helperName];
}}
}
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
exports['default']=function (instance){
instance.registerHelper('blockHelperMissing', function (context, options){
var inverse=options.inverse,
fn=options.fn;
if(context===true){
return fn(this);
}else if(context===false||context==null){
return inverse(this);
}else if(_utils.isArray(context)){
if(context.length > 0){
if(options.ids){
options.ids=[options.name];
}
return instance.helpers.each(context, options);
}else{
return inverse(this);
}}else{
if(options.data&&options.ids){
var data=_utils.createFrame(options.data);
data.contextPath=_utils.appendContextPath(options.data.contextPath, options.name);
options={ data: data };}
return fn(context, options);
}});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
(function(global){'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _utils=__webpack_require__(5);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
exports['default']=function (instance){
instance.registerHelper('each', function (context, options){
if(!options){
throw new _exception2['default']('Must pass iterator to #each');
}
var fn=options.fn,
inverse=options.inverse,
i=0,
ret='',
data=undefined,
contextPath=undefined;
if(options.data&&options.ids){
contextPath=_utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
}
if(_utils.isFunction(context)){
context=context.call(this);
}
if(options.data){
data=_utils.createFrame(options.data);
}
function execIteration(field, index, last){
if(data){
data.key=field;
data.index=index;
data.first=index===0;
data.last = !!last;
if(contextPath){
data.contextPath=contextPath + field;
}}
ret=ret + fn(context[field], {
data: data,
blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
});
}
if(context&&typeof context==='object'){
if(_utils.isArray(context)){
for (var j=context.length; i < j; i++){
if(i in context){
execIteration(i, i, i===context.length - 1);
}}
}else if(global.Symbol&&context[global.Symbol.iterator]){
var newContext=[];
var iterator=context[global.Symbol.iterator]();
for (var it=iterator.next(); !it.done; it=iterator.next()){
newContext.push(it.value);
}
context=newContext;
for (var j=context.length; i < j; i++){
execIteration(i, i, i===context.length - 1);
}}else{
var priorKey=undefined;
for (var key in context){
if(context.hasOwnProperty(key)){
if(priorKey!==undefined){
execIteration(priorKey, i - 1);
}
priorKey=key;
i++;
}}
if(priorKey!==undefined){
execIteration(priorKey, i - 1, true);
}}
}
if(i===0){
ret=inverse(this);
}
return ret;
});
};
module.exports=exports['default'];
}.call(exports, (function(){ return this; }())))
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
exports['default']=function (instance){
instance.registerHelper('helperMissing', function () {
if(arguments.length===1){
return undefined;
}else{
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
}});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
exports['default']=function (instance){
instance.registerHelper('if', function (conditional, options){
if(_utils.isFunction(conditional)){
conditional=conditional.call(this);
}
if(!options.hash.includeZero&&!conditional||_utils.isEmpty(conditional)){
return options.inverse(this);
}else{
return options.fn(this);
}});
instance.registerHelper('unless', function (conditional, options){
return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
});
};
module.exports=exports['default'];
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
exports['default']=function (instance){
instance.registerHelper('log', function () {
var args=[undefined],
options=arguments[arguments.length - 1];
for (var i=0; i < arguments.length - 1; i++){
args.push(arguments[i]);
}
var level=1;
if(options.hash.level!=null){
level=options.hash.level;
}else if(options.data&&options.data.level!=null){
level=options.data.level;
}
args[0]=level;
instance.log.apply(instance, args);
});
};
module.exports=exports['default'];
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
exports['default']=function (instance){
instance.registerHelper('lookup', function (obj, field){
if(!obj){
return obj;
}
if(field==='constructor'&&!obj.propertyIsEnumerable(field)){
return undefined;
}
return obj[field];
});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
exports['default']=function (instance){
instance.registerHelper('with', function (context, options){
if(_utils.isFunction(context)){
context=context.call(this);
}
var fn=options.fn;
if(!_utils.isEmpty(context)){
var data=options.data;
if(options.data&&options.ids){
data=_utils.createFrame(options.data);
data.contextPath=_utils.appendContextPath(options.data.contextPath, options.ids[0]);
}
return fn(context, {
data: data,
blockParams: _utils.blockParams([context], [data&&data.contextPath])
});
}else{
return options.inverse(this);
}});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.registerDefaultDecorators=registerDefaultDecorators;
var _decoratorsInline=__webpack_require__(19);
var _decoratorsInline2=_interopRequireDefault(_decoratorsInline);
function registerDefaultDecorators(instance){
_decoratorsInline2['default'](instance);
}
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
exports['default']=function (instance){
instance.registerDecorator('inline', function (fn, props, container, options){
var ret=fn;
if(!props.partials){
props.partials={};
ret=function (context, options){
var original=container.partials;
container.partials=_utils.extend({}, original, props.partials);
var ret=fn(context, options);
container.partials=original;
return ret;
};}
props.partials[options.args[0]]=options.fn;
return ret;
});
};
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
var logger={
methodMap: ['debug', 'info', 'warn', 'error'],
level: 'info',
lookupLevel: function lookupLevel(level){
if(typeof level==='string'){
var levelMap=_utils.indexOf(logger.methodMap, level.toLowerCase());
if(levelMap >=0){
level=levelMap;
}else{
level=parseInt(level, 10);
}}
return level;
},
log: function log(level){
level=logger.lookupLevel(level);
if(typeof console!=='undefined'&&logger.lookupLevel(logger.level) <=level){
var method=logger.methodMap[level];
if(!console[method]){
method='log';
}
for (var _len=arguments.length, message=Array(_len > 1 ? _len - 1:0), _key=1; _key < _len; _key++){
message[_key - 1]=arguments[_key];
}
console[method].apply(console, message);
}}
};
exports['default']=logger;
module.exports=exports['default'];
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
function SafeString(string){
this.string=string;
}
SafeString.prototype.toString=SafeString.prototype.toHTML=function (){
return '' + this.string;
};
exports['default']=SafeString;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _Object$seal=__webpack_require__(23)['default'];
var _interopRequireWildcard=__webpack_require__(3)['default'];
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.checkRevision=checkRevision;
exports.template=template;
exports.wrapProgram=wrapProgram;
exports.resolvePartial=resolvePartial;
exports.invokePartial=invokePartial;
exports.noop=noop;
var _utils=__webpack_require__(5);
var Utils=_interopRequireWildcard(_utils);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _base=__webpack_require__(4);
var _helpers=__webpack_require__(10);
function checkRevision(compilerInfo){
var compilerRevision=compilerInfo&&compilerInfo[0]||1,
currentRevision=_base.COMPILER_REVISION;
if(compilerRevision >=_base.LAST_COMPATIBLE_COMPILER_REVISION&&compilerRevision <=_base.COMPILER_REVISION){
return;
}
if(compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION){
var runtimeVersions=_base.REVISION_CHANGES[currentRevision],
compilerVersions=_base.REVISION_CHANGES[compilerRevision];
throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
}else{
throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
}}
function template(templateSpec, env){
if(!env){
throw new _exception2['default']('No environment passed to template');
}
if(!templateSpec||!templateSpec.main){
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
}
templateSpec.main.decorator=templateSpec.main_d;
env.VM.checkRevision(templateSpec.compiler);
var templateWasPrecompiledWithCompilerV7=templateSpec.compiler&&templateSpec.compiler[0]===7;
function invokePartialWrapper(partial, context, options){
if(options.hash){
context=Utils.extend({}, context, options.hash);
if(options.ids){
options.ids[0]=true;
}}
partial=env.VM.resolvePartial.call(this, partial, context, options);
var optionsWithHooks=Utils.extend({}, options, { hooks: this.hooks });
var result=env.VM.invokePartial.call(this, partial, context, optionsWithHooks);
if(result==null&&env.compile){
options.partials[options.name]=env.compile(partial, templateSpec.compilerOptions, env);
result=options.partials[options.name](context, optionsWithHooks);
}
if(result!=null){
if(options.indent){
var lines=result.split('\n');
for (var i=0, l=lines.length; i < l; i++){
if(!lines[i]&&i + 1===l){
break;
}
lines[i]=options.indent + lines[i];
}
result=lines.join('\n');
}
return result;
}else{
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
}}
var container={
strict: function strict(obj, name){
if(!(name in obj)){
throw new _exception2['default']('"' + name + '" not defined in ' + obj);
}
return obj[name];
},
lookup: function lookup(depths, name){
var len=depths.length;
for (var i=0; i < len; i++){
if(depths[i]&&depths[i][name]!=null){
return depths[i][name];
}}
},
lambda: function lambda(current, context){
return typeof current==='function' ? current.call(context):current;
},
escapeExpression: Utils.escapeExpression,
invokePartial: invokePartialWrapper,
fn: function fn(i){
var ret=templateSpec[i];
ret.decorator=templateSpec[i + '_d'];
return ret;
},
programs: [],
program: function program(i, data, declaredBlockParams, blockParams, depths){
var programWrapper=this.programs[i],
fn=this.fn(i);
if(data||depths||blockParams||declaredBlockParams){
programWrapper=wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
}else if(!programWrapper){
programWrapper=this.programs[i]=wrapProgram(this, i, fn);
}
return programWrapper;
},
data: function data(value, depth){
while (value&&depth--){
value=value._parent;
}
return value;
},
nullContext: _Object$seal({}),
noop: env.VM.noop,
compilerInfo: templateSpec.compiler
};
function ret(context){
var options=arguments.length <=1||arguments[1]===undefined ? {}:arguments[1];
var data=options.data;
ret._setup(options);
if(!options.partial&&templateSpec.useData){
data=initData(context, data);
}
var depths=undefined,
blockParams=templateSpec.useBlockParams ? []:undefined;
if(templateSpec.useDepths){
if(options.depths){
depths=context!=options.depths[0] ? [context].concat(options.depths):options.depths;
}else{
depths=[context];
}}
function main(context ){
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
}
main=executeDecorators(templateSpec.main, main, container, options.depths||[], data, blockParams);
return main(context, options);
}
ret.isTop=true;
ret._setup=function (options){
if(!options.partial){
container.helpers=Utils.extend({}, env.helpers, options.helpers);
if(templateSpec.usePartial){
container.partials=Utils.extend({}, env.partials, options.partials);
}
if(templateSpec.usePartial||templateSpec.useDecorators){
container.decorators=Utils.extend({}, env.decorators, options.decorators);
}
container.hooks={};
var keepHelperInHelpers=options.allowCallsToHelperMissing||templateWasPrecompiledWithCompilerV7;
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
}else{
container.helpers=options.helpers;
container.partials=options.partials;
container.decorators=options.decorators;
container.hooks=options.hooks;
}};
ret._child=function (i, data, blockParams, depths){
if(templateSpec.useBlockParams&&!blockParams){
throw new _exception2['default']('must pass block params');
}
if(templateSpec.useDepths&&!depths){
throw new _exception2['default']('must pass parent depths');
}
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
};
return ret;
}
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths){
function prog(context){
var options=arguments.length <=1||arguments[1]===undefined ? {}:arguments[1];
var currentDepths=depths;
if(depths&&context!=depths[0]&&!(context===container.nullContext&&depths[0]===null)){
currentDepths=[context].concat(depths);
}
return fn(container, context, container.helpers, container.partials, options.data||data, blockParams&&[options.blockParams].concat(blockParams), currentDepths);
}
prog=executeDecorators(fn, prog, container, depths, data, blockParams);
prog.program=i;
prog.depth=depths ? depths.length:0;
prog.blockParams=declaredBlockParams||0;
return prog;
}
function resolvePartial(partial, context, options){
if(!partial){
if(options.name==='@partial-block'){
partial=options.data['partial-block'];
}else{
partial=options.partials[options.name];
}}else if(!partial.call&&!options.name){
options.name=partial;
partial=options.partials[partial];
}
return partial;
}
function invokePartial(partial, context, options){
var currentPartialBlock=options.data&&options.data['partial-block'];
options.partial=true;
if(options.ids){
options.data.contextPath=options.ids[0]||options.data.contextPath;
}
var partialBlock=undefined;
if(options.fn&&options.fn!==noop){
(function (){
options.data=_base.createFrame(options.data);
var fn=options.fn;
partialBlock=options.data['partial-block']=function partialBlockWrapper(context){
var options=arguments.length <=1||arguments[1]===undefined ? {}:arguments[1];
options.data=_base.createFrame(options.data);
options.data['partial-block']=currentPartialBlock;
return fn(context, options);
};
if(fn.partials){
options.partials=Utils.extend({}, options.partials, fn.partials);
}})();
}
if(partial===undefined&&partialBlock){
partial=partialBlock;
}
if(partial===undefined){
throw new _exception2['default']('The partial ' + options.name + ' could not be found');
}else if(partial instanceof Function){
return partial(context, options);
}}
function noop(){
return '';
}
function initData(context, data){
if(!data||!('root' in data)){
data=data ? _base.createFrame(data):{};
data.root=context;
}
return data;
}
function executeDecorators(fn, prog, container, depths, data, blockParams){
if(fn.decorator){
var props={};
prog=fn.decorator(prog, props, container, depths&&depths[0], data, blockParams, depths);
Utils.extend(prog, props);
}
return prog;
}
}),
(function(module, exports, __webpack_require__){
module.exports={ "default": __webpack_require__(24), __esModule: true };
}),
(function(module, exports, __webpack_require__){
__webpack_require__(25);
module.exports=__webpack_require__(30).Object.seal;
}),
(function(module, exports, __webpack_require__){
var isObject=__webpack_require__(26);
__webpack_require__(27)('seal', function($seal){
return function seal(it){
return $seal&&isObject(it) ? $seal(it):it;
};});
}),
(function(module, exports){
module.exports=function(it){
return typeof it==='object' ? it!==null:typeof it==='function';
};
}),
(function(module, exports, __webpack_require__){
var $export=__webpack_require__(28)
, core=__webpack_require__(30)
, fails=__webpack_require__(33);
module.exports=function(KEY, exec){
var fn=(core.Object||{})[KEY]||Object[KEY]
, exp={};
exp[KEY]=exec(fn);
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
};
}),
(function(module, exports, __webpack_require__){
var global=__webpack_require__(29)
, core=__webpack_require__(30)
, ctx=__webpack_require__(31)
, PROTOTYPE='prototype';
var $export=function(type, name, source){
var IS_FORCED=type & $export.F
, IS_GLOBAL=type & $export.G
, IS_STATIC=type & $export.S
, IS_PROTO=type & $export.P
, IS_BIND=type & $export.B
, IS_WRAP=type & $export.W
, exports=IS_GLOBAL ? core:core[name]||(core[name]={})
, target=IS_GLOBAL ? global:IS_STATIC ? global[name]:(global[name]||{})[PROTOTYPE]
, key, own, out;
if(IS_GLOBAL)source=name;
for(key in source){
own = !IS_FORCED&&target&&key in target;
if(own&&key in exports)continue;
out=own ? target[key]:source[key];
exports[key]=IS_GLOBAL&&typeof target[key]!='function' ? source[key]
: IS_BIND&&own ? ctx(out, global)
: IS_WRAP&&target[key]==out ? (function(C){
var F=function(param){
return this instanceof C ? new C(param):C(param);
};
F[PROTOTYPE]=C[PROTOTYPE];
return F;
})(out):IS_PROTO&&typeof out=='function' ? ctx(Function.call, out):out;
if(IS_PROTO)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out;
}};
$export.F=1;
$export.G=2;
$export.S=4;
$export.P=8;
$export.B=16;
$export.W=32;
module.exports=$export;
}),
(function(module, exports){
var global=module.exports=typeof window!='undefined'&&window.Math==Math
? window:typeof self!='undefined'&&self.Math==Math ? self:Function('return this')();
if(typeof __g=='number')__g=global;
}),
(function(module, exports){
var core=module.exports={version: '1.2.6'};
if(typeof __e=='number')__e=core;
}),
(function(module, exports, __webpack_require__){
var aFunction=__webpack_require__(32);
module.exports=function(fn, that, length){
aFunction(fn);
if(that===undefined)return fn;
switch(length){
case 1: return function(a){
return fn.call(that, a);
};
case 2: return function(a, b){
return fn.call(that, a, b);
};
case 3: return function(a, b, c){
return fn.call(that, a, b, c);
};}
return function(){
return fn.apply(that, arguments);
};};
}),
(function(module, exports){
module.exports=function(it){
if(typeof it!='function')throw TypeError(it + ' is not a function!');
return it;
};
}),
(function(module, exports){
module.exports=function(exec){
try {
return !!exec();
} catch(e){
return true;
}};
}),
(function(module, exports){
(function(global){
'use strict';
exports.__esModule=true;
exports['default']=function (Handlebars){
var root=typeof global!=='undefined' ? global:window,
$Handlebars=root.Handlebars;
Handlebars.noConflict=function (){
if(root.Handlebars===Handlebars){
root.Handlebars=$Handlebars;
}
return Handlebars;
};};
module.exports=exports['default'];
}.call(exports, (function(){ return this; }())))
}),
(function(module, exports){
'use strict';
exports.__esModule=true;
var AST={
helpers: {
helperExpression: function helperExpression(node){
return node.type==='SubExpression'||(node.type==='MustacheStatement'||node.type==='BlockStatement')&&!!(node.params&&node.params.length||node.hash);
},
scopedId: function scopedId(path){
return (/^\.|this\b/.test(path.original)
);
},
simpleId: function simpleId(path){
return path.parts.length===1&&!AST.helpers.scopedId(path)&&!path.depth;
}}
};
exports['default']=AST;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
var _interopRequireWildcard=__webpack_require__(3)['default'];
exports.__esModule=true;
exports.parse=parse;
var _parser=__webpack_require__(37);
var _parser2=_interopRequireDefault(_parser);
var _whitespaceControl=__webpack_require__(38);
var _whitespaceControl2=_interopRequireDefault(_whitespaceControl);
var _helpers=__webpack_require__(40);
var Helpers=_interopRequireWildcard(_helpers);
var _utils=__webpack_require__(5);
exports.parser=_parser2['default'];
var yy={};
_utils.extend(yy, Helpers);
function parse(input, options){
if(input.type==='Program'){
return input;
}
_parser2['default'].yy=yy;
yy.locInfo=function (locInfo){
return new yy.SourceLocation(options&&options.srcName, locInfo);
};
var strip=new _whitespaceControl2['default'](options);
return strip.accept(_parser2['default'].parse(input));
}
}),
(function(module, exports){
"use strict";
exports.__esModule=true;
var handlebars=(function (){
var parser={ trace: function trace(){},
yy: {},
symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$){
var $0=$$.length - 1;
switch (yystate){
case 1:
return $$[$0 - 1];
break;
case 2:
this.$=yy.prepareProgram($$[$0]);
break;
case 3:
this.$=$$[$0];
break;
case 4:
this.$=$$[$0];
break;
case 5:
this.$=$$[$0];
break;
case 6:
this.$=$$[$0];
break;
case 7:
this.$=$$[$0];
break;
case 8:
this.$=$$[$0];
break;
case 9:
this.$={
type: 'CommentStatement',
value: yy.stripComment($$[$0]),
strip: yy.stripFlags($$[$0], $$[$0]),
loc: yy.locInfo(this._$)
};
break;
case 10:
this.$={
type: 'ContentStatement',
original: $$[$0],
value: $$[$0],
loc: yy.locInfo(this._$)
};
break;
case 11:
this.$=yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
break;
case 12:
this.$={ path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
break;
case 13:
this.$=yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
break;
case 14:
this.$=yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
break;
case 15:
this.$={ open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
break;
case 16:
this.$={ path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
break;
case 17:
this.$={ path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
break;
case 18:
this.$={ strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
break;
case 19:
var inverse=yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
program=yy.prepareProgram([inverse], $$[$0 - 1].loc);
program.chained=true;
this.$={ strip: $$[$0 - 2].strip, program: program, chain: true };
break;
case 20:
this.$=$$[$0];
break;
case 21:
this.$={ path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
break;
case 22:
this.$=yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
break;
case 23:
this.$=yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
break;
case 24:
this.$={
type: 'PartialStatement',
name: $$[$0 - 3],
params: $$[$0 - 2],
hash: $$[$0 - 1],
indent: '',
strip: yy.stripFlags($$[$0 - 4], $$[$0]),
loc: yy.locInfo(this._$)
};
break;
case 25:
this.$=yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
break;
case 26:
this.$={ path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
break;
case 27:
this.$=$$[$0];
break;
case 28:
this.$=$$[$0];
break;
case 29:
this.$={
type: 'SubExpression',
path: $$[$0 - 3],
params: $$[$0 - 2],
hash: $$[$0 - 1],
loc: yy.locInfo(this._$)
};
break;
case 30:
this.$={ type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
break;
case 31:
this.$={ type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
break;
case 32:
this.$=yy.id($$[$0 - 1]);
break;
case 33:
this.$=$$[$0];
break;
case 34:
this.$=$$[$0];
break;
case 35:
this.$={ type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
break;
case 36:
this.$={ type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
break;
case 37:
this.$={ type: 'BooleanLiteral', value: $$[$0]==='true', original: $$[$0]==='true', loc: yy.locInfo(this._$) };
break;
case 38:
this.$={ type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
break;
case 39:
this.$={ type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
break;
case 40:
this.$=$$[$0];
break;
case 41:
this.$=$$[$0];
break;
case 42:
this.$=yy.preparePath(true, $$[$0], this._$);
break;
case 43:
this.$=yy.preparePath(false, $$[$0], this._$);
break;
case 44:
$$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$=$$[$0 - 2];
break;
case 45:
this.$=[{ part: yy.id($$[$0]), original: $$[$0] }];
break;
case 46:
this.$=[];
break;
case 47:
$$[$0 - 1].push($$[$0]);
break;
case 48:
this.$=[$$[$0]];
break;
case 49:
$$[$0 - 1].push($$[$0]);
break;
case 50:
this.$=[];
break;
case 51:
$$[$0 - 1].push($$[$0]);
break;
case 58:
this.$=[];
break;
case 59:
$$[$0 - 1].push($$[$0]);
break;
case 64:
this.$=[];
break;
case 65:
$$[$0 - 1].push($$[$0]);
break;
case 70:
this.$=[];
break;
case 71:
$$[$0 - 1].push($$[$0]);
break;
case 78:
this.$=[];
break;
case 79:
$$[$0 - 1].push($$[$0]);
break;
case 82:
this.$=[];
break;
case 83:
$$[$0 - 1].push($$[$0]);
break;
case 86:
this.$=[];
break;
case 87:
$$[$0 - 1].push($$[$0]);
break;
case 90:
this.$=[];
break;
case 91:
$$[$0 - 1].push($$[$0]);
break;
case 94:
this.$=[];
break;
case 95:
$$[$0 - 1].push($$[$0]);
break;
case 98:
this.$=[$$[$0]];
break;
case 99:
$$[$0 - 1].push($$[$0]);
break;
case 100:
this.$=[$$[$0]];
break;
case 101:
$$[$0 - 1].push($$[$0]);
break;
}},
table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] },
parseError: function parseError(str, hash){
throw new Error(str);
},
parse: function parse(input){
var self=this,
stack=[0],
vstack=[null],
lstack=[],
table=this.table,
yytext="",
yylineno=0,
yyleng=0,
recovering=0,
TERROR=2,
EOF=1;
this.lexer.setInput(input);
this.lexer.yy=this.yy;
this.yy.lexer=this.lexer;
this.yy.parser=this;
if(typeof this.lexer.yylloc=="undefined") this.lexer.yylloc={};
var yyloc=this.lexer.yylloc;
lstack.push(yyloc);
var ranges=this.lexer.options&&this.lexer.options.ranges;
if(typeof this.yy.parseError==="function") this.parseError=this.yy.parseError;
function popStack(n){
stack.length=stack.length - 2 * n;
vstack.length=vstack.length - n;
lstack.length=lstack.length - n;
}
function lex(){
var token;
token=self.lexer.lex()||1;
if(typeof token!=="number"){
token=self.symbols_[token]||token;
}
return token;
}
var symbol,
preErrorSymbol,
state,
action,
a,
r,
yyval={},
p,
len,
newState,
expected;
while (true){
state=stack[stack.length - 1];
if(this.defaultActions[state]){
action=this.defaultActions[state];
}else{
if(symbol===null||typeof symbol=="undefined"){
symbol=lex();
}
action=table[state]&&table[state][symbol];
}
if(typeof action==="undefined"||!action.length||!action[0]){
var errStr="";
if(!recovering){
expected=[];
for (p in table[state]) if(this.terminals_[p]&&p > 2){
expected.push("'" + this.terminals_[p] + "'");
}
if(this.lexer.showPosition){
errStr="Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol]||symbol) + "'";
}else{
errStr="Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol==1 ? "end of input":"'" + (this.terminals_[symbol]||symbol) + "'");
}
this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol]||symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
}}
if(action[0] instanceof Array&&action.length > 1){
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
}
switch (action[0]){
case 1:
stack.push(symbol);
vstack.push(this.lexer.yytext);
lstack.push(this.lexer.yylloc);
stack.push(action[1]);
symbol=null;
if(!preErrorSymbol){
yyleng=this.lexer.yyleng;
yytext=this.lexer.yytext;
yylineno=this.lexer.yylineno;
yyloc=this.lexer.yylloc;
if(recovering > 0) recovering--;
}else{
symbol=preErrorSymbol;
preErrorSymbol=null;
}
break;
case 2:
len=this.productions_[action[1]][1];
yyval.$=vstack[vstack.length - len];
yyval._$={ first_line: lstack[lstack.length - (len||1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len||1)].first_column, last_column: lstack[lstack.length - 1].last_column };
if(ranges){
yyval._$.range=[lstack[lstack.length - (len||1)].range[0], lstack[lstack.length - 1].range[1]];
}
r=this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
if(typeof r!=="undefined"){
return r;
}
if(len){
stack=stack.slice(0, -1 * len * 2);
vstack=vstack.slice(0, -1 * len);
lstack=lstack.slice(0, -1 * len);
}
stack.push(this.productions_[action[1]][0]);
vstack.push(yyval.$);
lstack.push(yyval._$);
newState=table[stack[stack.length - 2]][stack[stack.length - 1]];
stack.push(newState);
break;
case 3:
return true;
}}
return true;
}};
var lexer=(function (){
var lexer={ EOF: 1,
parseError: function parseError(str, hash){
if(this.yy.parser){
this.yy.parser.parseError(str, hash);
}else{
throw new Error(str);
}},
setInput: function setInput(input){
this._input=input;
this._more=this._less=this.done=false;
this.yylineno=this.yyleng=0;
this.yytext=this.matched=this.match='';
this.conditionStack=['INITIAL'];
this.yylloc={ first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
if(this.options.ranges) this.yylloc.range=[0, 0];
this.offset=0;
return this;
},
input: function input(){
var ch=this._input[0];
this.yytext +=ch;
this.yyleng++;
this.offset++;
this.match +=ch;
this.matched +=ch;
var lines=ch.match(/(?:\r\n?|\n).*/g);
if(lines){
this.yylineno++;
this.yylloc.last_line++;
}else{
this.yylloc.last_column++;
}
if(this.options.ranges) this.yylloc.range[1]++;
this._input=this._input.slice(1);
return ch;
},
unput: function unput(ch){
var len=ch.length;
var lines=ch.split(/(?:\r\n?|\n)/g);
this._input=ch + this._input;
this.yytext=this.yytext.substr(0, this.yytext.length - len - 1);
this.offset -=len;
var oldLines=this.match.split(/(?:\r\n?|\n)/g);
this.match=this.match.substr(0, this.match.length - 1);
this.matched=this.matched.substr(0, this.matched.length - 1);
if(lines.length - 1) this.yylineno -=lines.length - 1;
var r=this.yylloc.range;
this.yylloc={ first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: lines ? (lines.length===oldLines.length ? this.yylloc.first_column:0) + oldLines[oldLines.length - lines.length].length - lines[0].length:this.yylloc.first_column - len
};
if(this.options.ranges){
this.yylloc.range=[r[0], r[0] + this.yyleng - len];
}
return this;
},
more: function more(){
this._more=true;
return this;
},
less: function less(n){
this.unput(this.match.slice(n));
},
pastInput: function pastInput(){
var past=this.matched.substr(0, this.matched.length - this.match.length);
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
},
upcomingInput: function upcomingInput(){
var next=this.match;
if(next.length < 20){
next +=this._input.substr(0, 20 - next.length);
}
return (next.substr(0, 20) + (next.length > 20 ? '...':'')).replace(/\n/g, "");
},
showPosition: function showPosition(){
var pre=this.pastInput();
var c=new Array(pre.length + 1).join("-");
return pre + this.upcomingInput() + "\n" + c + "^";
},
next: function next(){
if(this.done){
return this.EOF;
}
if(!this._input) this.done=true;
var token, match, tempMatch, index, col, lines;
if(!this._more){
this.yytext='';
this.match='';
}
var rules=this._currentRules();
for (var i=0; i < rules.length; i++){
tempMatch=this._input.match(this.rules[rules[i]]);
if(tempMatch&&(!match||tempMatch[0].length > match[0].length)){
match=tempMatch;
index=i;
if(!this.options.flex) break;
}}
if(match){
lines=match[0].match(/(?:\r\n?|\n).*/g);
if(lines) this.yylineno +=lines.length;
this.yylloc={ first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length:this.yylloc.last_column + match[0].length };
this.yytext +=match[0];
this.match +=match[0];
this.matches=match;
this.yyleng=this.yytext.length;
if(this.options.ranges){
this.yylloc.range=[this.offset, this.offset +=this.yyleng];
}
this._more=false;
this._input=this._input.slice(match[0].length);
this.matched +=match[0];
token=this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
if(this.done&&this._input) this.done=false;
if(token) return token;else return;
}
if(this._input===""){
return this.EOF;
}else{
return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
}},
lex: function lex(){
var r=this.next();
if(typeof r!=='undefined'){
return r;
}else{
return this.lex();
}},
begin: function begin(condition){
this.conditionStack.push(condition);
},
popState: function popState(){
return this.conditionStack.pop();
},
_currentRules: function _currentRules(){
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
},
topState: function topState(){
return this.conditionStack[this.conditionStack.length - 2];
},
pushState: function begin(condition){
this.begin(condition);
}};
lexer.options={};
lexer.performAction=function anonymous(yy, yy_, $avoiding_name_collisions, YY_START){
function strip(start, end){
return yy_.yytext=yy_.yytext.substring(start, yy_.yyleng - end + start);
}
var YYSTATE=YY_START;
switch ($avoiding_name_collisions){
case 0:
if(yy_.yytext.slice(-2)==="\\\\"){
strip(0, 1);
this.begin("mu");
}else if(yy_.yytext.slice(-1)==="\\"){
strip(0, 1);
this.begin("emu");
}else{
this.begin("mu");
}
if(yy_.yytext) return 15;
break;
case 1:
return 15;
break;
case 2:
this.popState();
return 15;
break;
case 3:
this.begin('raw');return 15;
break;
case 4:
this.popState();
if(this.conditionStack[this.conditionStack.length - 1]==='raw'){
return 15;
}else{
strip(5, 9);
return 'END_RAW_BLOCK';
}
break;
case 5:
return 15;
break;
case 6:
this.popState();
return 14;
break;
case 7:
return 65;
break;
case 8:
return 68;
break;
case 9:
return 19;
break;
case 10:
this.popState();
this.begin('raw');
return 23;
break;
case 11:
return 55;
break;
case 12:
return 60;
break;
case 13:
return 29;
break;
case 14:
return 47;
break;
case 15:
this.popState();return 44;
break;
case 16:
this.popState();return 44;
break;
case 17:
return 34;
break;
case 18:
return 39;
break;
case 19:
return 51;
break;
case 20:
return 48;
break;
case 21:
this.unput(yy_.yytext);
this.popState();
this.begin('com');
break;
case 22:
this.popState();
return 14;
break;
case 23:
return 48;
break;
case 24:
return 73;
break;
case 25:
return 72;
break;
case 26:
return 72;
break;
case 27:
return 87;
break;
case 28:
break;
case 29:
this.popState();return 54;
break;
case 30:
this.popState();return 33;
break;
case 31:
yy_.yytext=strip(1, 2).replace(/\\"/g, '"');return 80;
break;
case 32:
yy_.yytext=strip(1, 2).replace(/\\'/g, "'");return 80;
break;
case 33:
return 85;
break;
case 34:
return 82;
break;
case 35:
return 82;
break;
case 36:
return 83;
break;
case 37:
return 84;
break;
case 38:
return 81;
break;
case 39:
return 75;
break;
case 40:
return 77;
break;
case 41:
return 72;
break;
case 42:
yy_.yytext=yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
break;
case 43:
return 'INVALID';
break;
case 44:
return 5;
break;
}};
lexer.rules=[/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
lexer.conditions={ "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true }};
return lexer;
})();
parser.lexer=lexer;
function Parser(){
this.yy={};}Parser.prototype=parser;parser.Parser=Parser;
return new Parser();
})();exports["default"]=handlebars;
module.exports=exports["default"];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _visitor=__webpack_require__(39);
var _visitor2=_interopRequireDefault(_visitor);
function WhitespaceControl(){
var options=arguments.length <=0||arguments[0]===undefined ? {}:arguments[0];
this.options=options;
}
WhitespaceControl.prototype=new _visitor2['default']();
WhitespaceControl.prototype.Program=function (program){
var doStandalone = !this.options.ignoreStandalone;
var isRoot = !this.isRootSeen;
this.isRootSeen=true;
var body=program.body;
for (var i=0, l=body.length; i < l; i++){
var current=body[i],
strip=this.accept(current);
if(!strip){
continue;
}
var _isPrevWhitespace=isPrevWhitespace(body, i, isRoot),
_isNextWhitespace=isNextWhitespace(body, i, isRoot),
openStandalone=strip.openStandalone&&_isPrevWhitespace,
closeStandalone=strip.closeStandalone&&_isNextWhitespace,
inlineStandalone=strip.inlineStandalone&&_isPrevWhitespace&&_isNextWhitespace;
if(strip.close){
omitRight(body, i, true);
}
if(strip.open){
omitLeft(body, i, true);
}
if(doStandalone&&inlineStandalone){
omitRight(body, i);
if(omitLeft(body, i)){
if(current.type==='PartialStatement'){
current.indent=/([ \t]+$)/.exec(body[i - 1].original)[1];
}}
}
if(doStandalone&&openStandalone){
omitRight((current.program||current.inverse).body);
omitLeft(body, i);
}
if(doStandalone&&closeStandalone){
omitRight(body, i);
omitLeft((current.inverse||current.program).body);
}}
return program;
};
WhitespaceControl.prototype.BlockStatement=WhitespaceControl.prototype.DecoratorBlock=WhitespaceControl.prototype.PartialBlockStatement=function (block){
this.accept(block.program);
this.accept(block.inverse);
var program=block.program||block.inverse,
inverse=block.program&&block.inverse,
firstInverse=inverse,
lastInverse=inverse;
if(inverse&&inverse.chained){
firstInverse=inverse.body[0].program;
while (lastInverse.chained){
lastInverse=lastInverse.body[lastInverse.body.length - 1].program;
}}
var strip={
open: block.openStrip.open,
close: block.closeStrip.close,
openStandalone: isNextWhitespace(program.body),
closeStandalone: isPrevWhitespace((firstInverse||program).body)
};
if(block.openStrip.close){
omitRight(program.body, null, true);
}
if(inverse){
var inverseStrip=block.inverseStrip;
if(inverseStrip.open){
omitLeft(program.body, null, true);
}
if(inverseStrip.close){
omitRight(firstInverse.body, null, true);
}
if(block.closeStrip.open){
omitLeft(lastInverse.body, null, true);
}
if(!this.options.ignoreStandalone&&isPrevWhitespace(program.body)&&isNextWhitespace(firstInverse.body)){
omitLeft(program.body);
omitRight(firstInverse.body);
}}else if(block.closeStrip.open){
omitLeft(program.body, null, true);
}
return strip;
};
WhitespaceControl.prototype.Decorator=WhitespaceControl.prototype.MustacheStatement=function (mustache){
return mustache.strip;
};
WhitespaceControl.prototype.PartialStatement=WhitespaceControl.prototype.CommentStatement=function (node){
var strip=node.strip||{};
return {
inlineStandalone: true,
open: strip.open,
close: strip.close
};};
function isPrevWhitespace(body, i, isRoot){
if(i===undefined){
i=body.length;
}
var prev=body[i - 1],
sibling=body[i - 2];
if(!prev){
return isRoot;
}
if(prev.type==='ContentStatement'){
return (sibling||!isRoot ? /\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(prev.original);
}}
function isNextWhitespace(body, i, isRoot){
if(i===undefined){
i=-1;
}
var next=body[i + 1],
sibling=body[i + 2];
if(!next){
return isRoot;
}
if(next.type==='ContentStatement'){
return (sibling||!isRoot ? /^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(next.original);
}}
function omitRight(body, i, multiple){
var current=body[i==null ? 0:i + 1];
if(!current||current.type!=='ContentStatement'||!multiple&¤t.rightStripped){
return;
}
var original=current.value;
current.value=current.value.replace(multiple ? /^\s+/:/^[ \t]*\r?\n?/, '');
current.rightStripped=current.value!==original;
}
function omitLeft(body, i, multiple){
var current=body[i==null ? body.length - 1:i - 1];
if(!current||current.type!=='ContentStatement'||!multiple&¤t.leftStripped){
return;
}
var original=current.value;
current.value=current.value.replace(multiple ? /\s+$/:/[ \t]+$/, '');
current.leftStripped=current.value!==original;
return current.leftStripped;
}
exports['default']=WhitespaceControl;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
function Visitor(){
this.parents=[];
}
Visitor.prototype={
constructor: Visitor,
mutating: false,
acceptKey: function acceptKey(node, name){
var value=this.accept(node[name]);
if(this.mutating){
if(value&&!Visitor.prototype[value.type]){
throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
}
node[name]=value;
}},
acceptRequired: function acceptRequired(node, name){
this.acceptKey(node, name);
if(!node[name]){
throw new _exception2['default'](node.type + ' requires ' + name);
}},
acceptArray: function acceptArray(array){
for (var i=0, l=array.length; i < l; i++){
this.acceptKey(array, i);
if(!array[i]){
array.splice(i, 1);
i--;
l--;
}}
},
accept: function accept(object){
if(!object){
return;
}
if(!this[object.type]){
throw new _exception2['default']('Unknown type: ' + object.type, object);
}
if(this.current){
this.parents.unshift(this.current);
}
this.current=object;
var ret=this[object.type](object);
this.current=this.parents.shift();
if(!this.mutating||ret){
return ret;
}else if(ret!==false){
return object;
}},
Program: function Program(program){
this.acceptArray(program.body);
},
MustacheStatement: visitSubExpression,
Decorator: visitSubExpression,
BlockStatement: visitBlock,
DecoratorBlock: visitBlock,
PartialStatement: visitPartial,
PartialBlockStatement: function PartialBlockStatement(partial){
visitPartial.call(this, partial);
this.acceptKey(partial, 'program');
},
ContentStatement: function ContentStatement() {},
CommentStatement: function CommentStatement() {},
SubExpression: visitSubExpression,
PathExpression: function PathExpression() {},
StringLiteral: function StringLiteral() {},
NumberLiteral: function NumberLiteral() {},
BooleanLiteral: function BooleanLiteral() {},
UndefinedLiteral: function UndefinedLiteral() {},
NullLiteral: function NullLiteral() {},
Hash: function Hash(hash){
this.acceptArray(hash.pairs);
},
HashPair: function HashPair(pair){
this.acceptRequired(pair, 'value');
}};
function visitSubExpression(mustache){
this.acceptRequired(mustache, 'path');
this.acceptArray(mustache.params);
this.acceptKey(mustache, 'hash');
}
function visitBlock(block){
visitSubExpression.call(this, block);
this.acceptKey(block, 'program');
this.acceptKey(block, 'inverse');
}
function visitPartial(partial){
this.acceptRequired(partial, 'name');
this.acceptArray(partial.params);
this.acceptKey(partial, 'hash');
}
exports['default']=Visitor;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.SourceLocation=SourceLocation;
exports.id=id;
exports.stripFlags=stripFlags;
exports.stripComment=stripComment;
exports.preparePath=preparePath;
exports.prepareMustache=prepareMustache;
exports.prepareRawBlock=prepareRawBlock;
exports.prepareBlock=prepareBlock;
exports.prepareProgram=prepareProgram;
exports.preparePartialBlock=preparePartialBlock;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
function validateClose(open, close){
close=close.path ? close.path.original:close;
if(open.path.original!==close){
var errorNode={ loc: open.path.loc };
throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
}}
function SourceLocation(source, locInfo){
this.source=source;
this.start={
line: locInfo.first_line,
column: locInfo.first_column
};
this.end={
line: locInfo.last_line,
column: locInfo.last_column
};}
function id(token){
if(/^\[.*\]$/.test(token)){
return token.substring(1, token.length - 1);
}else{
return token;
}}
function stripFlags(open, close){
return {
open: open.charAt(2)==='~',
close: close.charAt(close.length - 3)==='~'
};}
function stripComment(comment){
return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
}
function preparePath(data, parts, loc){
loc=this.locInfo(loc);
var original=data ? '@':'',
dig=[],
depth=0;
for (var i=0, l=parts.length; i < l; i++){
var part=parts[i].part,
isLiteral=parts[i].original!==part;
original +=(parts[i].separator||'') + part;
if(!isLiteral&&(part==='..'||part==='.'||part==='this')){
if(dig.length > 0){
throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
}else if(part==='..'){
depth++;
}}else{
dig.push(part);
}}
return {
type: 'PathExpression',
data: data,
depth: depth,
parts: dig,
original: original,
loc: loc
};}
function prepareMustache(path, params, hash, open, strip, locInfo){
var escapeFlag=open.charAt(3)||open.charAt(2),
escaped=escapeFlag!=='{'&&escapeFlag!=='&';
var decorator=/\*/.test(open);
return {
type: decorator ? 'Decorator':'MustacheStatement',
path: path,
params: params,
hash: hash,
escaped: escaped,
strip: strip,
loc: this.locInfo(locInfo)
};}
function prepareRawBlock(openRawBlock, contents, close, locInfo){
validateClose(openRawBlock, close);
locInfo=this.locInfo(locInfo);
var program={
type: 'Program',
body: contents,
strip: {},
loc: locInfo
};
return {
type: 'BlockStatement',
path: openRawBlock.path,
params: openRawBlock.params,
hash: openRawBlock.hash,
program: program,
openStrip: {},
inverseStrip: {},
closeStrip: {},
loc: locInfo
};}
function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo){
if(close&&close.path){
validateClose(openBlock, close);
}
var decorator=/\*/.test(openBlock.open);
program.blockParams=openBlock.blockParams;
var inverse=undefined,
inverseStrip=undefined;
if(inverseAndProgram){
if(decorator){
throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
}
if(inverseAndProgram.chain){
inverseAndProgram.program.body[0].closeStrip=close.strip;
}
inverseStrip=inverseAndProgram.strip;
inverse=inverseAndProgram.program;
}
if(inverted){
inverted=inverse;
inverse=program;
program=inverted;
}
return {
type: decorator ? 'DecoratorBlock':'BlockStatement',
path: openBlock.path,
params: openBlock.params,
hash: openBlock.hash,
program: program,
inverse: inverse,
openStrip: openBlock.strip,
inverseStrip: inverseStrip,
closeStrip: close&&close.strip,
loc: this.locInfo(locInfo)
};}
function prepareProgram(statements, loc){
if(!loc&&statements.length){
var firstLoc=statements[0].loc,
lastLoc=statements[statements.length - 1].loc;
if(firstLoc&&lastLoc){
loc={
source: firstLoc.source,
start: {
line: firstLoc.start.line,
column: firstLoc.start.column
},
end: {
line: lastLoc.end.line,
column: lastLoc.end.column
}};}}
return {
type: 'Program',
body: statements,
strip: {},
loc: loc
};}
function preparePartialBlock(open, program, close, locInfo){
validateClose(open, close);
return {
type: 'PartialBlockStatement',
name: open.path,
params: open.params,
hash: open.hash,
program: program,
openStrip: open.strip,
closeStrip: close&&close.strip,
loc: this.locInfo(locInfo)
};}
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
exports.Compiler=Compiler;
exports.precompile=precompile;
exports.compile=compile;
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _utils=__webpack_require__(5);
var _ast=__webpack_require__(35);
var _ast2=_interopRequireDefault(_ast);
var slice=[].slice;
function Compiler(){}
Compiler.prototype={
compiler: Compiler,
equals: function equals(other){
var len=this.opcodes.length;
if(other.opcodes.length!==len){
return false;
}
for (var i=0; i < len; i++){
var opcode=this.opcodes[i],
otherOpcode=other.opcodes[i];
if(opcode.opcode!==otherOpcode.opcode||!argEquals(opcode.args, otherOpcode.args)){
return false;
}}
len=this.children.length;
for (var i=0; i < len; i++){
if(!this.children[i].equals(other.children[i])){
return false;
}}
return true;
},
guid: 0,
compile: function compile(program, options){
this.sourceNode=[];
this.opcodes=[];
this.children=[];
this.options=options;
this.stringParams=options.stringParams;
this.trackIds=options.trackIds;
options.blockParams=options.blockParams||[];
var knownHelpers=options.knownHelpers;
options.knownHelpers={
'helperMissing': true,
'blockHelperMissing': true,
'each': true,
'if': true,
'unless': true,
'with': true,
'log': true,
'lookup': true
};
if(knownHelpers){
for (var _name in knownHelpers){
this.options.knownHelpers[_name]=knownHelpers[_name];
}}
return this.accept(program);
},
compileProgram: function compileProgram(program){
var childCompiler=new this.compiler(),
result=childCompiler.compile(program, this.options),
guid=this.guid++;
this.usePartial=this.usePartial||result.usePartial;
this.children[guid]=result;
this.useDepths=this.useDepths||result.useDepths;
return guid;
},
accept: function accept(node){
if(!this[node.type]){
throw new _exception2['default']('Unknown type: ' + node.type, node);
}
this.sourceNode.unshift(node);
var ret=this[node.type](node);
this.sourceNode.shift();
return ret;
},
Program: function Program(program){
this.options.blockParams.unshift(program.blockParams);
var body=program.body,
bodyLength=body.length;
for (var i=0; i < bodyLength; i++){
this.accept(body[i]);
}
this.options.blockParams.shift();
this.isSimple=bodyLength===1;
this.blockParams=program.blockParams ? program.blockParams.length:0;
return this;
},
BlockStatement: function BlockStatement(block){
transformLiteralToPath(block);
var program=block.program,
inverse=block.inverse;
program=program&&this.compileProgram(program);
inverse=inverse&&this.compileProgram(inverse);
var type=this.classifySexpr(block);
if(type==='helper'){
this.helperSexpr(block, program, inverse);
}else if(type==='simple'){
this.simpleSexpr(block);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
this.opcode('emptyHash');
this.opcode('blockValue', block.path.original);
}else{
this.ambiguousSexpr(block, program, inverse);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
this.opcode('emptyHash');
this.opcode('ambiguousBlockValue');
}
this.opcode('append');
},
DecoratorBlock: function DecoratorBlock(decorator){
var program=decorator.program&&this.compileProgram(decorator.program);
var params=this.setupFullMustacheParams(decorator, program, undefined),
path=decorator.path;
this.useDecorators=true;
this.opcode('registerDecorator', params.length, path.original);
},
PartialStatement: function PartialStatement(partial){
this.usePartial=true;
var program=partial.program;
if(program){
program=this.compileProgram(partial.program);
}
var params=partial.params;
if(params.length > 1){
throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
}else if(!params.length){
if(this.options.explicitPartialContext){
this.opcode('pushLiteral', 'undefined');
}else{
params.push({ type: 'PathExpression', parts: [], depth: 0 });
}}
var partialName=partial.name.original,
isDynamic=partial.name.type==='SubExpression';
if(isDynamic){
this.accept(partial.name);
}
this.setupFullMustacheParams(partial, program, undefined, true);
var indent=partial.indent||'';
if(this.options.preventIndent&&indent){
this.opcode('appendContent', indent);
indent='';
}
this.opcode('invokePartial', isDynamic, partialName, indent);
this.opcode('append');
},
PartialBlockStatement: function PartialBlockStatement(partialBlock){
this.PartialStatement(partialBlock);
},
MustacheStatement: function MustacheStatement(mustache){
this.SubExpression(mustache);
if(mustache.escaped&&!this.options.noEscape){
this.opcode('appendEscaped');
}else{
this.opcode('append');
}},
Decorator: function Decorator(decorator){
this.DecoratorBlock(decorator);
},
ContentStatement: function ContentStatement(content){
if(content.value){
this.opcode('appendContent', content.value);
}},
CommentStatement: function CommentStatement(){},
SubExpression: function SubExpression(sexpr){
transformLiteralToPath(sexpr);
var type=this.classifySexpr(sexpr);
if(type==='simple'){
this.simpleSexpr(sexpr);
}else if(type==='helper'){
this.helperSexpr(sexpr);
}else{
this.ambiguousSexpr(sexpr);
}},
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse){
var path=sexpr.path,
name=path.parts[0],
isBlock=program!=null||inverse!=null;
this.opcode('getContext', path.depth);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
path.strict=true;
this.accept(path);
this.opcode('invokeAmbiguous', name, isBlock);
},
simpleSexpr: function simpleSexpr(sexpr){
var path=sexpr.path;
path.strict=true;
this.accept(path);
this.opcode('resolvePossibleLambda');
},
helperSexpr: function helperSexpr(sexpr, program, inverse){
var params=this.setupFullMustacheParams(sexpr, program, inverse),
path=sexpr.path,
name=path.parts[0];
if(this.options.knownHelpers[name]){
this.opcode('invokeKnownHelper', params.length, name);
}else if(this.options.knownHelpersOnly){
throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
}else{
path.strict=true;
path.falsy=true;
this.accept(path);
this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
}},
PathExpression: function PathExpression(path){
this.addDepth(path.depth);
this.opcode('getContext', path.depth);
var name=path.parts[0],
scoped=_ast2['default'].helpers.scopedId(path),
blockParamId = !path.depth&&!scoped&&this.blockParamIndex(name);
if(blockParamId){
this.opcode('lookupBlockParam', blockParamId, path.parts);
}else if(!name){
this.opcode('pushContext');
}else if(path.data){
this.options.data=true;
this.opcode('lookupData', path.depth, path.parts, path.strict);
}else{
this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
}},
StringLiteral: function StringLiteral(string){
this.opcode('pushString', string.value);
},
NumberLiteral: function NumberLiteral(number){
this.opcode('pushLiteral', number.value);
},
BooleanLiteral: function BooleanLiteral(bool){
this.opcode('pushLiteral', bool.value);
},
UndefinedLiteral: function UndefinedLiteral(){
this.opcode('pushLiteral', 'undefined');
},
NullLiteral: function NullLiteral(){
this.opcode('pushLiteral', 'null');
},
Hash: function Hash(hash){
var pairs=hash.pairs,
i=0,
l=pairs.length;
this.opcode('pushHash');
for (; i < l; i++){
this.pushParam(pairs[i].value);
}
while (i--){
this.opcode('assignToHash', pairs[i].key);
}
this.opcode('popHash');
},
opcode: function opcode(name){
this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
},
addDepth: function addDepth(depth){
if(!depth){
return;
}
this.useDepths=true;
},
classifySexpr: function classifySexpr(sexpr){
var isSimple=_ast2['default'].helpers.simpleId(sexpr.path);
var isBlockParam=isSimple&&!!this.blockParamIndex(sexpr.path.parts[0]);
var isHelper = !isBlockParam&&_ast2['default'].helpers.helperExpression(sexpr);
var isEligible = !isBlockParam&&(isHelper||isSimple);
if(isEligible&&!isHelper){
var _name2=sexpr.path.parts[0],
options=this.options;
if(options.knownHelpers[_name2]){
isHelper=true;
}else if(options.knownHelpersOnly){
isEligible=false;
}}
if(isHelper){
return 'helper';
}else if(isEligible){
return 'ambiguous';
}else{
return 'simple';
}},
pushParams: function pushParams(params){
for (var i=0, l=params.length; i < l; i++){
this.pushParam(params[i]);
}},
pushParam: function pushParam(val){
var value=val.value!=null ? val.value:val.original||'';
if(this.stringParams){
if(value.replace){
value=value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
}
if(val.depth){
this.addDepth(val.depth);
}
this.opcode('getContext', val.depth||0);
this.opcode('pushStringParam', value, val.type);
if(val.type==='SubExpression'){
this.accept(val);
}}else{
if(this.trackIds){
var blockParamIndex=undefined;
if(val.parts&&!_ast2['default'].helpers.scopedId(val)&&!val.depth){
blockParamIndex=this.blockParamIndex(val.parts[0]);
}
if(blockParamIndex){
var blockParamChild=val.parts.slice(1).join('.');
this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
}else{
value=val.original||value;
if(value.replace){
value=value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
}
this.opcode('pushId', val.type, value);
}}
this.accept(val);
}},
setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty){
var params=sexpr.params;
this.pushParams(params);
this.opcode('pushProgram', program);
this.opcode('pushProgram', inverse);
if(sexpr.hash){
this.accept(sexpr.hash);
}else{
this.opcode('emptyHash', omitEmpty);
}
return params;
},
blockParamIndex: function blockParamIndex(name){
for (var depth=0, len=this.options.blockParams.length; depth < len; depth++){
var blockParams=this.options.blockParams[depth],
param=blockParams&&_utils.indexOf(blockParams, name);
if(blockParams&¶m >=0){
return [depth, param];
}}
}};
function precompile(input, options, env){
if(input==null||typeof input!=='string'&&input.type!=='Program'){
throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
}
options=options||{};
if(!('data' in options)){
options.data=true;
}
if(options.compat){
options.useDepths=true;
}
var ast=env.parse(input, options),
environment=new env.Compiler().compile(ast, options);
return new env.JavaScriptCompiler().compile(environment, options);
}
function compile(input, options, env){
if(options===undefined) options={};
if(input==null||typeof input!=='string'&&input.type!=='Program'){
throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
}
options=_utils.extend({}, options);
if(!('data' in options)){
options.data=true;
}
if(options.compat){
options.useDepths=true;
}
var compiled=undefined;
function compileInput(){
var ast=env.parse(input, options),
environment=new env.Compiler().compile(ast, options),
templateSpec=new env.JavaScriptCompiler().compile(environment, options, undefined, true);
return env.template(templateSpec);
}
function ret(context, execOptions){
if(!compiled){
compiled=compileInput();
}
return compiled.call(this, context, execOptions);
}
ret._setup=function (setupOptions){
if(!compiled){
compiled=compileInput();
}
return compiled._setup(setupOptions);
};
ret._child=function (i, data, blockParams, depths){
if(!compiled){
compiled=compileInput();
}
return compiled._child(i, data, blockParams, depths);
};
return ret;
}
function argEquals(a, b){
if(a===b){
return true;
}
if(_utils.isArray(a)&&_utils.isArray(b)&&a.length===b.length){
for (var i=0; i < a.length; i++){
if(!argEquals(a[i], b[i])){
return false;
}}
return true;
}}
function transformLiteralToPath(sexpr){
if(!sexpr.path.parts){
var literal=sexpr.path;
sexpr.path={
type: 'PathExpression',
data: false,
depth: 0,
parts: [literal.original + ''],
original: literal.original + '',
loc: literal.loc
};}}
}),
(function(module, exports, __webpack_require__){
'use strict';
var _interopRequireDefault=__webpack_require__(1)['default'];
exports.__esModule=true;
var _base=__webpack_require__(4);
var _exception=__webpack_require__(6);
var _exception2=_interopRequireDefault(_exception);
var _utils=__webpack_require__(5);
var _codeGen=__webpack_require__(43);
var _codeGen2=_interopRequireDefault(_codeGen);
function Literal(value){
this.value=value;
}
function JavaScriptCompiler(){}
JavaScriptCompiler.prototype={
nameLookup: function nameLookup(parent, name ){
var isEnumerable=[this.aliasable('container.propertyIsEnumerable'), '.call(', parent, ',"constructor")'];
if(name==='constructor'){
return ['(', isEnumerable, '?', _actualLookup(), ':undefined)'];
}
return _actualLookup();
function _actualLookup(){
if(JavaScriptCompiler.isValidJavaScriptVariableName(name)){
return [parent, '.', name];
}else{
return [parent, '[', JSON.stringify(name), ']'];
}}
},
depthedLookup: function depthedLookup(name){
return [this.aliasable('container.lookup'), '(depths, "', name, '")'];
},
compilerInfo: function compilerInfo(){
var revision=_base.COMPILER_REVISION,
versions=_base.REVISION_CHANGES[revision];
return [revision, versions];
},
appendToBuffer: function appendToBuffer(source, location, explicit){
if(!_utils.isArray(source)){
source=[source];
}
source=this.source.wrap(source, location);
if(this.environment.isSimple){
return ['return ', source, ';'];
}else if(explicit){
return ['buffer +=', source, ';'];
}else{
source.appendToBuffer=true;
return source;
}},
initializeBuffer: function initializeBuffer(){
return this.quotedString('');
},
compile: function compile(environment, options, context, asObject){
this.environment=environment;
this.options=options;
this.stringParams=this.options.stringParams;
this.trackIds=this.options.trackIds;
this.precompile = !asObject;
this.name=this.environment.name;
this.isChild = !!context;
this.context=context||{
decorators: [],
programs: [],
environments: []
};
this.preamble();
this.stackSlot=0;
this.stackVars=[];
this.aliases={};
this.registers={ list: [] };
this.hashes=[];
this.compileStack=[];
this.inlineStack=[];
this.blockParams=[];
this.compileChildren(environment, options);
this.useDepths=this.useDepths||environment.useDepths||environment.useDecorators||this.options.compat;
this.useBlockParams=this.useBlockParams||environment.useBlockParams;
var opcodes=environment.opcodes,
opcode=undefined,
firstLoc=undefined,
i=undefined,
l=undefined;
for (i=0, l=opcodes.length; i < l; i++){
opcode=opcodes[i];
this.source.currentLocation=opcode.loc;
firstLoc=firstLoc||opcode.loc;
this[opcode.opcode].apply(this, opcode.args);
}
this.source.currentLocation=firstLoc;
this.pushSource('');
if(this.stackSlot||this.inlineStack.length||this.compileStack.length){
throw new _exception2['default']('Compile completed with content left on stack');
}
if(!this.decorators.isEmpty()){
this.useDecorators=true;
this.decorators.prepend('var decorators=container.decorators;\n');
this.decorators.push('return fn;');
if(asObject){
this.decorators=Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
}else{
this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths){\n');
this.decorators.push('}\n');
this.decorators=this.decorators.merge();
}}else{
this.decorators=undefined;
}
var fn=this.createFunctionContext(asObject);
if(!this.isChild){
var ret={
compiler: this.compilerInfo(),
main: fn
};
if(this.decorators){
ret.main_d=this.decorators;
ret.useDecorators=true;
}
var _context=this.context;
var programs=_context.programs;
var decorators=_context.decorators;
for (i=0, l=programs.length; i < l; i++){
if(programs[i]){
ret[i]=programs[i];
if(decorators[i]){
ret[i + '_d']=decorators[i];
ret.useDecorators=true;
}}
}
if(this.environment.usePartial){
ret.usePartial=true;
}
if(this.options.data){
ret.useData=true;
}
if(this.useDepths){
ret.useDepths=true;
}
if(this.useBlockParams){
ret.useBlockParams=true;
}
if(this.options.compat){
ret.compat=true;
}
if(!asObject){
ret.compiler=JSON.stringify(ret.compiler);
this.source.currentLocation={ start: { line: 1, column: 0 }};
ret=this.objectLiteral(ret);
if(options.srcName){
ret=ret.toStringWithSourceMap({ file: options.destName });
ret.map=ret.map&&ret.map.toString();
}else{
ret=ret.toString();
}}else{
ret.compilerOptions=this.options;
}
return ret;
}else{
return fn;
}},
preamble: function preamble(){
this.lastContext=0;
this.source=new _codeGen2['default'](this.options.srcName);
this.decorators=new _codeGen2['default'](this.options.srcName);
},
createFunctionContext: function createFunctionContext(asObject){
var varDeclarations='';
var locals=this.stackVars.concat(this.registers.list);
if(locals.length > 0){
varDeclarations +=', ' + locals.join(', ');
}
var aliasCount=0;
for (var alias in this.aliases){
var node=this.aliases[alias];
if(this.aliases.hasOwnProperty(alias)&&node.children&&node.referenceCount > 1){
varDeclarations +=', alias' + ++aliasCount + '=' + alias;
node.children[0]='alias' + aliasCount;
}}
var params=['container', 'depth0', 'helpers', 'partials', 'data'];
if(this.useBlockParams||this.useDepths){
params.push('blockParams');
}
if(this.useDepths){
params.push('depths');
}
var source=this.mergeSource(varDeclarations);
if(asObject){
params.push(source);
return Function.apply(this, params);
}else{
return this.source.wrap(['function(', params.join(','), '){\n ', source, '}']);
}},
mergeSource: function mergeSource(varDeclarations){
var isSimple=this.environment.isSimple,
appendOnly = !this.forceBuffer,
appendFirst=undefined,
sourceSeen=undefined,
bufferStart=undefined,
bufferEnd=undefined;
this.source.each(function (line){
if(line.appendToBuffer){
if(bufferStart){
line.prepend(' + ');
}else{
bufferStart=line;
}
bufferEnd=line;
}else{
if(bufferStart){
if(!sourceSeen){
appendFirst=true;
}else{
bufferStart.prepend('buffer +=');
}
bufferEnd.add(';');
bufferStart=bufferEnd=undefined;
}
sourceSeen=true;
if(!isSimple){
appendOnly=false;
}}
});
if(appendOnly){
if(bufferStart){
bufferStart.prepend('return ');
bufferEnd.add(';');
}else if(!sourceSeen){
this.source.push('return "";');
}}else{
varDeclarations +=', buffer=' + (appendFirst ? '':this.initializeBuffer());
if(bufferStart){
bufferStart.prepend('return buffer + ');
bufferEnd.add(';');
}else{
this.source.push('return buffer;');
}}
if(varDeclarations){
this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '':';\n'));
}
return this.source.merge();
},
blockValue: function blockValue(name){
var blockHelperMissing=this.aliasable('container.hooks.blockHelperMissing'),
params=[this.contextName(0)];
this.setupHelperArgs(name, 0, params);
var blockName=this.popStack();
params.splice(1, 0, blockName);
this.push(this.source.functionCall(blockHelperMissing, 'call', params));
},
ambiguousBlockValue: function ambiguousBlockValue(){
var blockHelperMissing=this.aliasable('container.hooks.blockHelperMissing'),
params=[this.contextName(0)];
this.setupHelperArgs('', 0, params, true);
this.flushInline();
var current=this.topStack();
params.splice(1, 0, current);
this.pushSource(['if(!', this.lastHelper, '){ ', current, '=', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
},
appendContent: function appendContent(content){
if(this.pendingContent){
content=this.pendingContent + content;
}else{
this.pendingLocation=this.source.currentLocation;
}
this.pendingContent=content;
},
append: function append(){
if(this.isInline()){
this.replaceStack(function (current){
return ['!=null ? ', current, ':""'];
});
this.pushSource(this.appendToBuffer(this.popStack()));
}else{
var local=this.popStack();
this.pushSource(['if(', local, '!=null){ ', this.appendToBuffer(local, undefined, true), ' }']);
if(this.environment.isSimple){
this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
}}
},
appendEscaped: function appendEscaped(){
this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
},
getContext: function getContext(depth){
this.lastContext=depth;
},
pushContext: function pushContext(){
this.pushStackLiteral(this.contextName(this.lastContext));
},
lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped){
var i=0;
if(!scoped&&this.options.compat&&!this.lastContext){
this.push(this.depthedLookup(parts[i++]));
}else{
this.pushContext();
}
this.resolvePath('context', parts, i, falsy, strict);
},
lookupBlockParam: function lookupBlockParam(blockParamId, parts){
this.useBlockParams=true;
this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
this.resolvePath('context', parts, 1);
},
lookupData: function lookupData(depth, parts, strict){
if(!depth){
this.pushStackLiteral('data');
}else{
this.pushStackLiteral('container.data(data, ' + depth + ')');
}
this.resolvePath('data', parts, 0, true, strict);
},
resolvePath: function resolvePath(type, parts, i, falsy, strict){
var _this=this;
if(this.options.strict||this.options.assumeObjects){
this.push(strictLookup(this.options.strict&&strict, this, parts, type));
return;
}
var len=parts.length;
for (; i < len; i++){
this.replaceStack(function (current){
var lookup=_this.nameLookup(current, parts[i], type);
if(!falsy){
return ['!=null ? ', lookup, ':', current];
}else{
return ['&&', lookup];
}});
}},
resolvePossibleLambda: function resolvePossibleLambda(){
this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
},
pushStringParam: function pushStringParam(string, type){
this.pushContext();
this.pushString(type);
if(type!=='SubExpression'){
if(typeof string==='string'){
this.pushString(string);
}else{
this.pushStackLiteral(string);
}}
},
emptyHash: function emptyHash(omitEmpty){
if(this.trackIds){
this.push('{}');
}
if(this.stringParams){
this.push('{}');
this.push('{}');
}
this.pushStackLiteral(omitEmpty ? 'undefined':'{}');
},
pushHash: function pushHash(){
if(this.hash){
this.hashes.push(this.hash);
}
this.hash={ values: [], types: [], contexts: [], ids: [] };},
popHash: function popHash(){
var hash=this.hash;
this.hash=this.hashes.pop();
if(this.trackIds){
this.push(this.objectLiteral(hash.ids));
}
if(this.stringParams){
this.push(this.objectLiteral(hash.contexts));
this.push(this.objectLiteral(hash.types));
}
this.push(this.objectLiteral(hash.values));
},
pushString: function pushString(string){
this.pushStackLiteral(this.quotedString(string));
},
pushLiteral: function pushLiteral(value){
this.pushStackLiteral(value);
},
pushProgram: function pushProgram(guid){
if(guid!=null){
this.pushStackLiteral(this.programExpression(guid));
}else{
this.pushStackLiteral(null);
}},
registerDecorator: function registerDecorator(paramSize, name){
var foundDecorator=this.nameLookup('decorators', name, 'decorator'),
options=this.setupHelperArgs(name, paramSize);
this.decorators.push(['fn=', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), '||fn;']);
},
invokeHelper: function invokeHelper(paramSize, name, isSimple){
var nonHelper=this.popStack(),
helper=this.setupHelper(paramSize, name);
var possibleFunctionCalls=[];
if(isSimple){
possibleFunctionCalls.push(helper.name);
}
possibleFunctionCalls.push(nonHelper);
if(!this.options.strict){
possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing'));
}
var functionLookupCode=['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')'];
var functionCall=this.source.functionCall(functionLookupCode, 'call', helper.callParams);
this.push(functionCall);
},
itemsSeparatedBy: function itemsSeparatedBy(items, separator){
var result=[];
result.push(items[0]);
for (var i=1; i < items.length; i++){
result.push(separator, items[i]);
}
return result;
},
invokeKnownHelper: function invokeKnownHelper(paramSize, name){
var helper=this.setupHelper(paramSize, name);
this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
},
invokeAmbiguous: function invokeAmbiguous(name, helperCall){
this.useRegister('helper');
var nonHelper=this.popStack();
this.emptyHash();
var helper=this.setupHelper(0, name, helperCall);
var helperName=this.lastHelper=this.nameLookup('helpers', name, 'helper');
var lookup=['(', '(helper=', helperName, '||', nonHelper, ')'];
if(!this.options.strict){
lookup[0]='(helper=';
lookup.push('!=null ? helper:', this.aliasable('container.hooks.helperMissing'));
}
this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit]:[], '),', '(typeof helper===', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ':helper))']);
},
invokePartial: function invokePartial(isDynamic, name, indent){
var params=[],
options=this.setupParams(name, 1, params);
if(isDynamic){
name=this.popStack();
delete options.name;
}
if(indent){
options.indent=JSON.stringify(indent);
}
options.helpers='helpers';
options.partials='partials';
options.decorators='container.decorators';
if(!isDynamic){
params.unshift(this.nameLookup('partials', name, 'partial'));
}else{
params.unshift(name);
}
if(this.options.compat){
options.depths='depths';
}
options=this.objectLiteral(options);
params.push(options);
this.push(this.source.functionCall('container.invokePartial', '', params));
},
assignToHash: function assignToHash(key){
var value=this.popStack(),
context=undefined,
type=undefined,
id=undefined;
if(this.trackIds){
id=this.popStack();
}
if(this.stringParams){
type=this.popStack();
context=this.popStack();
}
var hash=this.hash;
if(context){
hash.contexts[key]=context;
}
if(type){
hash.types[key]=type;
}
if(id){
hash.ids[key]=id;
}
hash.values[key]=value;
},
pushId: function pushId(type, name, child){
if(type==='BlockParam'){
this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child):''));
}else if(type==='PathExpression'){
this.pushString(name);
}else if(type==='SubExpression'){
this.pushStackLiteral('true');
}else{
this.pushStackLiteral('null');
}},
compiler: JavaScriptCompiler,
compileChildren: function compileChildren(environment, options){
var children=environment.children,
child=undefined,
compiler=undefined;
for (var i=0, l=children.length; i < l; i++){
child=children[i];
compiler=new this.compiler();
var existing=this.matchExistingProgram(child);
if(existing==null){
this.context.programs.push('');
var index=this.context.programs.length;
child.index=index;
child.name='program' + index;
this.context.programs[index]=compiler.compile(child, options, this.context, !this.precompile);
this.context.decorators[index]=compiler.decorators;
this.context.environments[index]=child;
this.useDepths=this.useDepths||compiler.useDepths;
this.useBlockParams=this.useBlockParams||compiler.useBlockParams;
child.useDepths=this.useDepths;
child.useBlockParams=this.useBlockParams;
}else{
child.index=existing.index;
child.name='program' + existing.index;
this.useDepths=this.useDepths||existing.useDepths;
this.useBlockParams=this.useBlockParams||existing.useBlockParams;
}}
},
matchExistingProgram: function matchExistingProgram(child){
for (var i=0, len=this.context.environments.length; i < len; i++){
var environment=this.context.environments[i];
if(environment&&environment.equals(child)){
return environment;
}}
},
programExpression: function programExpression(guid){
var child=this.environment.children[guid],
programParams=[child.index, 'data', child.blockParams];
if(this.useBlockParams||this.useDepths){
programParams.push('blockParams');
}
if(this.useDepths){
programParams.push('depths');
}
return 'container.program(' + programParams.join(', ') + ')';
},
useRegister: function useRegister(name){
if(!this.registers[name]){
this.registers[name]=true;
this.registers.list.push(name);
}},
push: function push(expr){
if(!(expr instanceof Literal)){
expr=this.source.wrap(expr);
}
this.inlineStack.push(expr);
return expr;
},
pushStackLiteral: function pushStackLiteral(item){
this.push(new Literal(item));
},
pushSource: function pushSource(source){
if(this.pendingContent){
this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
this.pendingContent=undefined;
}
if(source){
this.source.push(source);
}},
replaceStack: function replaceStack(callback){
var prefix=['('],
stack=undefined,
createdStack=undefined,
usedLiteral=undefined;
if(!this.isInline()){
throw new _exception2['default']('replaceStack on non-inline');
}
var top=this.popStack(true);
if(top instanceof Literal){
stack=[top.value];
prefix=['(', stack];
usedLiteral=true;
}else{
createdStack=true;
var _name=this.incrStack();
prefix=['((', this.push(_name), '=', top, ')'];
stack=this.topStack();
}
var item=callback.call(this, stack);
if(!usedLiteral){
this.popStack();
}
if(createdStack){
this.stackSlot--;
}
this.push(prefix.concat(item, ')'));
},
incrStack: function incrStack(){
this.stackSlot++;
if(this.stackSlot > this.stackVars.length){
this.stackVars.push('stack' + this.stackSlot);
}
return this.topStackName();
},
topStackName: function topStackName(){
return 'stack' + this.stackSlot;
},
flushInline: function flushInline(){
var inlineStack=this.inlineStack;
this.inlineStack=[];
for (var i=0, len=inlineStack.length; i < len; i++){
var entry=inlineStack[i];
if(entry instanceof Literal){
this.compileStack.push(entry);
}else{
var stack=this.incrStack();
this.pushSource([stack, '=', entry, ';']);
this.compileStack.push(stack);
}}
},
isInline: function isInline(){
return this.inlineStack.length;
},
popStack: function popStack(wrapped){
var inline=this.isInline(),
item=(inline ? this.inlineStack:this.compileStack).pop();
if(!wrapped&&item instanceof Literal){
return item.value;
}else{
if(!inline){
if(!this.stackSlot){
throw new _exception2['default']('Invalid stack pop');
}
this.stackSlot--;
}
return item;
}},
topStack: function topStack(){
var stack=this.isInline() ? this.inlineStack:this.compileStack,
item=stack[stack.length - 1];
if(item instanceof Literal){
return item.value;
}else{
return item;
}},
contextName: function contextName(context){
if(this.useDepths&&context){
return 'depths[' + context + ']';
}else{
return 'depth' + context;
}},
quotedString: function quotedString(str){
return this.source.quotedString(str);
},
objectLiteral: function objectLiteral(obj){
return this.source.objectLiteral(obj);
},
aliasable: function aliasable(name){
var ret=this.aliases[name];
if(ret){
ret.referenceCount++;
return ret;
}
ret=this.aliases[name]=this.source.wrap(name);
ret.aliasable=true;
ret.referenceCount=1;
return ret;
},
setupHelper: function setupHelper(paramSize, name, blockHelper){
var params=[],
paramsInit=this.setupHelperArgs(name, paramSize, params, blockHelper);
var foundHelper=this.nameLookup('helpers', name, 'helper'),
callContext=this.aliasable(this.contextName(0) + '!=null ? ' + this.contextName(0) + ':(container.nullContext||{})');
return {
params: params,
paramsInit: paramsInit,
name: foundHelper,
callParams: [callContext].concat(params)
};},
setupParams: function setupParams(helper, paramSize, params){
var options={},
contexts=[],
types=[],
ids=[],
objectArgs = !params,
param=undefined;
if(objectArgs){
params=[];
}
options.name=this.quotedString(helper);
options.hash=this.popStack();
if(this.trackIds){
options.hashIds=this.popStack();
}
if(this.stringParams){
options.hashTypes=this.popStack();
options.hashContexts=this.popStack();
}
var inverse=this.popStack(),
program=this.popStack();
if(program||inverse){
options.fn=program||'container.noop';
options.inverse=inverse||'container.noop';
}
var i=paramSize;
while (i--){
param=this.popStack();
params[i]=param;
if(this.trackIds){
ids[i]=this.popStack();
}
if(this.stringParams){
types[i]=this.popStack();
contexts[i]=this.popStack();
}}
if(objectArgs){
options.args=this.source.generateArray(params);
}
if(this.trackIds){
options.ids=this.source.generateArray(ids);
}
if(this.stringParams){
options.types=this.source.generateArray(types);
options.contexts=this.source.generateArray(contexts);
}
if(this.options.data){
options.data='data';
}
if(this.useBlockParams){
options.blockParams='blockParams';
}
return options;
},
setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister){
var options=this.setupParams(helper, paramSize, params);
options=this.objectLiteral(options);
if(useRegister){
this.useRegister('options');
params.push('options');
return ['options=', options];
}else if(params){
params.push(options);
return '';
}else{
return options;
}}
};
(function (){
var reservedWords=('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
var compilerWords=JavaScriptCompiler.RESERVED_WORDS={};
for (var i=0, l=reservedWords.length; i < l; i++){
compilerWords[reservedWords[i]]=true;
}})();
JavaScriptCompiler.isValidJavaScriptVariableName=function (name){
return !JavaScriptCompiler.RESERVED_WORDS[name]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
};
function strictLookup(requireTerminal, compiler, parts, type){
var stack=compiler.popStack(),
i=0,
len=parts.length;
if(requireTerminal){
len--;
}
for (; i < len; i++){
stack=compiler.nameLookup(stack, parts[i], type);
}
if(requireTerminal){
return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
}else{
return stack;
}}
exports['default']=JavaScriptCompiler;
module.exports=exports['default'];
}),
(function(module, exports, __webpack_require__){
'use strict';
exports.__esModule=true;
var _utils=__webpack_require__(5);
var SourceNode=undefined;
try {
if(false){
var SourceMap=require('source-map');
SourceNode=SourceMap.SourceNode;
}} catch (err){}
if(!SourceNode){
SourceNode=function (line, column, srcFile, chunks){
this.src='';
if(chunks){
this.add(chunks);
}};
SourceNode.prototype={
add: function add(chunks){
if(_utils.isArray(chunks)){
chunks=chunks.join('');
}
this.src +=chunks;
},
prepend: function prepend(chunks){
if(_utils.isArray(chunks)){
chunks=chunks.join('');
}
this.src=chunks + this.src;
},
toStringWithSourceMap: function toStringWithSourceMap(){
return { code: this.toString() };},
toString: function toString(){
return this.src;
}};}
function castChunk(chunk, codeGen, loc){
if(_utils.isArray(chunk)){
var ret=[];
for (var i=0, len=chunk.length; i < len; i++){
ret.push(codeGen.wrap(chunk[i], loc));
}
return ret;
}else if(typeof chunk==='boolean'||typeof chunk==='number'){
return chunk + '';
}
return chunk;
}
function CodeGen(srcFile){
this.srcFile=srcFile;
this.source=[];
}
CodeGen.prototype={
isEmpty: function isEmpty(){
return !this.source.length;
},
prepend: function prepend(source, loc){
this.source.unshift(this.wrap(source, loc));
},
push: function push(source, loc){
this.source.push(this.wrap(source, loc));
},
merge: function merge(){
var source=this.empty();
this.each(function (line){
source.add([' ', line, '\n']);
});
return source;
},
each: function each(iter){
for (var i=0, len=this.source.length; i < len; i++){
iter(this.source[i]);
}},
empty: function empty(){
var loc=this.currentLocation||{ start: {}};
return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
},
wrap: function wrap(chunk){
var loc=arguments.length <=1||arguments[1]===undefined ? this.currentLocation||{ start: {}}:arguments[1];
if(chunk instanceof SourceNode){
return chunk;
}
chunk=castChunk(chunk, this, loc);
return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
},
functionCall: function functionCall(fn, type, params){
params=this.generateList(params);
return this.wrap([fn, type ? '.' + type + '(':'(', params, ')']);
},
quotedString: function quotedString(str){
return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028')
.replace(/\u2029/g, '\\u2029') + '"';
},
objectLiteral: function objectLiteral(obj){
var pairs=[];
for (var key in obj){
if(obj.hasOwnProperty(key)){
var value=castChunk(obj[key], this);
if(value!=='undefined'){
pairs.push([this.quotedString(key), ':', value]);
}}
}
var ret=this.generateList(pairs);
ret.prepend('{');
ret.add('}');
return ret;
},
generateList: function generateList(entries){
var ret=this.empty();
for (var i=0, len=entries.length; i < len; i++){
if(i){
ret.add(',');
}
ret.add(castChunk(entries[i], this));
}
return ret;
},
generateArray: function generateArray(entries){
var ret=this.generateList(entries);
ret.prepend('[');
ret.add(']');
return ret;
}};
exports['default']=CodeGen;
module.exports=exports['default'];
})
])
});
;
(function(e){function d(){var e=o();if(e!==u){u=e;i.trigger("orientationchange")}}function E(t,n,r,i){var s=r.type;r.type=n;e.event.dispatch.call(t,r,i);r.type=s}e.attrFn=e.attrFn||{};var t=navigator.userAgent.toLowerCase(),n=t.indexOf("chrome")>-1&&(t.indexOf("windows")>-1||t.indexOf("macintosh")>-1||t.indexOf("linux")>-1)&&t.indexOf("chrome")<0,r={swipe_h_threshold:50,swipe_v_threshold:50,taphold_threshold:750,doubletap_int:500,touch_capable:"ontouchstart"in document.documentElement&&!n,orientation_support:"orientation"in window&&"onorientationchange"in window,startevent:"ontouchstart"in document.documentElement&&!n?"touchstart":"mousedown",endevent:"ontouchstart"in document.documentElement&&!n?"touchend":"mouseup",moveevent:"ontouchstart"in document.documentElement&&!n?"touchmove":"mousemove",tapevent:"ontouchstart"in document.documentElement&&!n?"tap":"click",scrollevent:"ontouchstart"in document.documentElement&&!n?"touchmove":"scroll",hold_timer:null,tap_timer:null};e.isTouchCapable=function(){return r.touch_capable};e.getStartEvent=function(){return r.startevent};e.getEndEvent=function(){return r.endevent};e.getMoveEvent=function(){return r.moveevent};e.getTapEvent=function(){return r.tapevent};e.getScrollEvent=function(){return r.scrollevent};e.each(["tapstart","tapend","tap","singletap","doubletap","taphold","swipe","swipeup","swiperight","swipedown","swipeleft","swipeend","scrollstart","scrollend","orientationchange"],function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)};e.attrFn[n]=true});e.event.special.tapstart={setup:function(){var t=this,n=e(t);n.bind(r.startevent,function(e){n.data("callee",arguments.callee);if(e.which&&e.which!==1){return false}var i=e.originalEvent,s={position:{x:r.touch_capable?i.touches[0].screenX:e.screenX,y:r.touch_capable?i.touches[0].screenY:e.screenY},offset:{x:r.touch_capable?i.touches[0].pageX-i.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?i.touches[0].pageY-i.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};E(t,"tapstart",e,s);return true})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee)}};e.event.special.tapend={setup:function(){var t=this,n=e(t);n.bind(r.endevent,function(e){n.data("callee",arguments.callee);var i=e.originalEvent;var s={position:{x:r.touch_capable?i.changedTouches[0].screenX:e.screenX,y:r.touch_capable?i.changedTouches[0].screenY:e.screenY},offset:{x:r.touch_capable?i.changedTouches[0].pageX-i.changedTouches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?i.changedTouches[0].pageY-i.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};E(t,"tapend",e,s);return true})},remove:function(){e(this).unbind(r.endevent,e(this).data.callee)}};e.event.special.taphold={setup:function(){var t=this,n=e(t),i,s,o={x:0,y:0};n.bind(r.startevent,function(e){if(e.which&&e.which!==1){return false}else{n.data("tapheld",false);i=e.target;var s=e.originalEvent;var u=(new Date).getTime(),a={x:r.touch_capable?s.touches[0].screenX:e.screenX,y:r.touch_capable?s.touches[0].screenY:e.screenY},f={x:r.touch_capable?s.touches[0].pageX-s.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?s.touches[0].pageY-s.touches[0].target.offsetTop:e.offsetY};o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;r.hold_timer=window.setTimeout(function(){var l=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX,c=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;if(e.target==i&&o.x==l&&o.y==c){n.data("tapheld",true);var h=(new Date).getTime(),p={x:r.touch_capable?s.touches[0].screenX:e.screenX,y:r.touch_capable?s.touches[0].screenY:e.screenY},d={x:r.touch_capable?s.touches[0].pageX-s.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?s.touches[0].pageY-s.touches[0].target.offsetTop:e.offsetY};duration=h-u;var v={startTime:u,endTime:h,startPosition:a,startOffset:f,endPosition:p,endOffset:d,duration:duration,target:e.target};n.data("callee1",arguments.callee);E(t,"taphold",e,v)}},r.taphold_threshold);return true}}).bind(r.endevent,function(){n.data("callee2",arguments.callee);n.data("tapheld",false);window.clearTimeout(r.hold_timer)})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.endevent,e(this).data.callee2)}};e.event.special.doubletap={setup:function(){var t=this,n=e(t),i,s,o,u;n.bind(r.startevent,function(e){if(e.which&&e.which!==1){return false}else{n.data("doubletapped",false);i=e.target;n.data("callee1",arguments.callee);u=e.originalEvent;o={position:{x:r.touch_capable?u.touches[0].screenX:e.screenX,y:r.touch_capable?u.touches[0].screenY:e.screenY},offset:{x:r.touch_capable?u.touches[0].pageX-u.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?u.touches[0].pageY-u.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};return true}}).bind(r.endevent,function(e){var a=(new Date).getTime();var f=n.data("lastTouch")||a+1;var l=a-f;window.clearTimeout(s);n.data("callee2",arguments.callee);if(l0&&e.target==i&&l>100){n.data("doubletapped",true);window.clearTimeout(r.tap_timer);var c={position:{x:r.touch_capable?u.touches[0].screenX:e.screenX,y:r.touch_capable?u.touches[0].screenY:e.screenY},offset:{x:r.touch_capable?u.touches[0].pageX-u.touches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?u.touches[0].pageY-u.touches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};var h={firstTap:o,secondTap:c,interval:c.time-o.time};E(t,"doubletap",e,h)}else{n.data("lastTouch",a);s=window.setTimeout(function(e){window.clearTimeout(s)},r.doubletap_int,[e])}n.data("lastTouch",a)})},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.endevent,e(this).data.callee2)}};e.event.special.singletap={setup:function(){var t=this,n=e(t),i=null,s=null,o={x:0,y:0};n.bind(r.startevent,function(e){if(e.which&&e.which!==1){return false}else{s=(new Date).getTime();i=e.target;n.data("callee1",arguments.callee);o.x=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageX:e.pageX;o.y=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0].pageY:e.pageY;return true}}).bind(r.endevent,function(e){n.data("callee2",arguments.callee);if(e.target==i){end_pos_x=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.pageX;end_pos_y=e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageY:e.pageY;r.tap_timer=window.setTimeout(function(){if(!n.data("doubletapped")&&!n.data("tapheld")&&o.x==end_pos_x&&o.y==end_pos_y){var i=e.originalEvent;var u={position:{x:r.touch_capable?i.changedTouches[0].screenX:e.screenX,y:r.touch_capable?i.changedTouches[0].screenY:e.screenY},offset:{x:r.touch_capable?i.changedTouches[0].pageX-i.changedTouches[0].target.offsetLeft:e.offsetX,y:r.touch_capable?i.changedTouches[0].pageY-i.changedTouches[0].target.offsetTop:e.offsetY},time:(new Date).getTime(),target:e.target};if(u.time-su.y&&o.y-u.y>p){f="swipeup"}if(o.xh){f="swiperight"}if(o.yp){f="swipedown"}if(o.x>u.x&&o.x-u.x>h){f="swipeleft"}if(f!=undefined&&i){o.x=0;o.y=0;u.x=0;u.y=0;i=false;var d=t.originalEvent;endEvnt={position:{x:r.touch_capable?d.touches[0].screenX:t.screenX,y:r.touch_capable?d.touches[0].screenY:t.screenY},offset:{x:r.touch_capable?d.touches[0].pageX-d.touches[0].target.offsetLeft:t.offsetX,y:r.touch_capable?d.touches[0].pageY-d.touches[0].target.offsetTop:t.offsetY},time:(new Date).getTime(),target:t.target};var v=Math.abs(a.position.x-endEvnt.position.x),m=Math.abs(a.position.y-endEvnt.position.y);var g={startEvnt:a,endEvnt:endEvnt,direction:f.replace("swipe",""),xAmount:v,yAmount:m,duration:endEvnt.time-a.time};s=true;n.trigger("swipe",g).trigger(f,g)}}function c(t){n=e(t.target);var o="";n.data("callee3",arguments.callee);if(s){var u=n.data("xthreshold"),f=n.data("ythreshold"),l=typeof u!=="undefined"&&u!==false&&parseInt(u)?parseInt(u):r.swipe_h_threshold,c=typeof f!=="undefined"&&f!==false&&parseInt(f)?parseInt(f):r.swipe_v_threshold;var h=t.originalEvent;endEvnt={position:{x:r.touch_capable?h.changedTouches[0].screenX:t.screenX,y:r.touch_capable?h.changedTouches[0].screenY:t.screenY},offset:{x:r.touch_capable?h.changedTouches[0].pageX-h.changedTouches[0].target.offsetLeft:t.offsetX,y:r.touch_capable?h.changedTouches[0].pageY-h.changedTouches[0].target.offsetTop:t.offsetY},time:(new Date).getTime(),target:t.target};if(a.position.y>endEvnt.position.y&&a.position.y-endEvnt.position.y>c){o="swipeup"}if(a.position.xl){o="swiperight"}if(a.position.yc){o="swipedown"}if(a.position.x>endEvnt.position.x&&a.position.x-endEvnt.position.x>l){o="swipeleft"}var p=Math.abs(a.position.x-endEvnt.position.x),d=Math.abs(a.position.y-endEvnt.position.y);var v={startEvnt:a,endEvnt:endEvnt,direction:o.replace("swipe",""),xAmount:p,yAmount:d,duration:endEvnt.time-a.time};n.trigger("swipeend",v)}i=false;s=false}var t=this,n=e(t),i=false,s=false,o={x:0,y:0},u={x:0,y:0},a;n.bind(r.startevent,f);n.bind(r.moveevent,l);n.bind(r.endevent,c)},remove:function(){e(this).unbind(r.startevent,e(this).data.callee1).unbind(r.moveevent,e(this).data.callee2).unbind(r.endevent,e(this).data.callee3)}};e.event.special.scrollstart={setup:function(){function o(e,n){i=n;E(t,i?"scrollstart":"scrollend",e)}var t=this,n=e(t),i,s;n.bind(r.scrollevent,function(e){n.data("callee",arguments.callee);if(!i){o(e,true)}clearTimeout(s);s=setTimeout(function(){o(e,false)},50)})},remove:function(){e(this).unbind(r.scrollevent,e(this).data.callee)}};var i=e(window),s,o,u,a,f,l={0:true,180:true};if(r.orientation_support){var c=window.innerWidth||e(window).width(),h=window.innerHeight||e(window).height(),p=50;a=c>h&&c-h>p;f=l[window.orientation];if(a&&f||!a&&!f){l={"-90":true,90:true}}}e.event.special.orientationchange=s={setup:function(){if(r.orientation_support){return false}u=o();i.bind("throttledresize",d);return true},teardown:function(){if(r.orientation_support){return false}i.unbind("throttledresize",d);return true},add:function(e){var t=e.handler;e.handler=function(e){e.orientation=o();return t.apply(this,arguments)}}};e.event.special.orientationchange.orientation=o=function(){var e=true,t=document.documentElement;if(r.orientation_support){e=l[window.orientation]}else{e=t&&t.clientWidth/t.clientHeight<1.1}return e?"portrait":"landscape"};e.event.special.throttledresize={setup:function(){e(this).bind("resize",m)},teardown:function(){e(this).unbind("resize",m)}};var v=250,m=function(){b=(new Date).getTime();w=b-g;if(w>=v){g=b;e(this).trigger("throttledresize")}else{if(y){window.clearTimeout(y)}y=window.setTimeout(d,v-w)}},g=0,y,b,w;e.each({scrollend:"scrollstart",swipeup:"swipe",swiperight:"swipe",swipedown:"swipe",swipeleft:"swipe",swipeend:"swipe"},function(t,n,r){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)}}})})(jQuery);
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sSe(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),F("week",5),F("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=D(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Xe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),C("hour","h"),F("hour",13),ue("a",et),ue("A",et),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T|)(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T|)(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=n("dates accessor is deprecated. Use date instead.",un),mn.months=n("months accessor is deprecated. Use month instead",Ue),mn.years=n("years accessor is deprecated. Use year instead",Oe),mn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&00&&evodata.data('exturl')) ? true: false;
const event_id=obj.closest('.eventon_list_event').data('event_id');
var event_list=obj.closest('.eventon_events_list');
var cal_ux_val=SC.ux_val;
var ux_val=obj.data('ux_val');
var exlk=obj.data('exlk');
if(cal_ux_val!=''&&cal_ux_val!==undefined&&cal_ux_val!='0'){
ux_val=cal_ux_val;
}
if(ux_val=='3'||ux_val=='3a'){
event.preventDefault();
EVO_LIGHTBOX=$('.evo_lightbox.eventcard');
LIGHTBOX_body=EVO_LIGHTBOX.find('.evo_lightbox_body');
repeat_interval=parseInt(obj.closest('.eventon_list_event').data('ri'));
repeat_interval=(repeat_interval)? repeat_interval: '0';
EVO_LIGHTBOX.find('.evo_pop_body').show();
fullheight_img_reset();
LIGHTBOX_body.html('');
if(event_list.hasClass('evortl')){
EVO_LIGHTBOX.find('.evo_popin').addClass('evortl');
EVO_LIGHTBOX.addClass('evortl');
}
if(ux_val=='3a'){
var new_content='';
new_content +='';
new_content +='
';
const box='
';
new_content +=box + box + box;
new_content +='
';
LIGHTBOX_body.append(''+ obj.html() +'
')
LIGHTBOX_body.append(new_content);
LIGHTBOX_body.attr('class','evo_lightbox_body eventon_list_event evo_pop_body evcal_eventcard event_'+event_id +'_'+ repeat_interval);
var data_arg={};
data_arg['event_id']=parseInt(event_id);
data_arg['ri']=repeat_interval;
data_arg['lang']=SC.lang;
data_arg['action']='eventon_load_single_eventcard_content';
var ra=true;
if(ra){
$.ajax({
beforeSend: function(){},
type: 'POST',
url:the_ajax_script.ajaxurl,
data: data_arg,
dataType:'json',
success:function(data){
if(data. status=='good'){
LIGHTBOX_body.html(data.html);
LIGHTBOX_body.find('.evopop_top').evoGenmaps({ 'fnt':2 ,'cal':cal });
fullheight_img_reset();
if(obj.data('runjs')) $('body').trigger('evo_load_single_event_content',[ event_id, obj]);
LIGHTBOX_body.evo_local_time();
}},complete:function(){
$('body').trigger('evo_single_event_load_end');
}});
}}else{
var content=obj.closest('.eventon_list_event').find('.event_description').html();
var _content=$(content).not('.evcal_close');
LIGHTBOX_body.append(''+ obj.html() +'
').append(_content);
LIGHTBOX_body.attr('class','evo_lightbox_body eventon_list_event evo_pop_body evcal_eventcard event_'+event_id +'_'+ repeat_interval);
LIGHTBOX_body.find('.evopop_top').evoGenmaps({ 'fnt':2 ,'cal':cal });
}
EVO_LIGHTBOX.addClass('show');
$('body').trigger('evolightbox_show');
fullheight_img_reset();
bgcolor=$('.evo_pop_body').find('.evcal_cblock').attr('data-bgcolor');
$('.evo_pop_body').find('.evopop_top').css({'border-left':'3px solid '+bgcolor});
if(obj.data('runjs')){
$('body').trigger('evo_load_single_event_content',[ event_id, obj]);
}
$('body').trigger('evolightbox_end');
return false;
}else if(ux_val=='4'){
var url=obj.attr('href');
if(url==''||url===undefined){
url=obj.parent().siblings('.evo_event_schema').find('a').attr('href');
}
if(obj.attr('target')=='_blank'){
window.open(url);
}else{
window.open(url, '_self');
}
return;
}else if(ux_val=='4a'){
if(obj.attr('href')!=''&&obj.attr('href')!==undefined){
return;
}else{
var url=obj.parent().siblings('.evo_event_schema').find('a').attr('href');
window.open(url);
return false;
}}else if(ux_val=='2'){
var url=obj.attr('href');
if(click_sinev_box){
event.preventDefault();
return false;
}
if(url!==undefined&&url!=''){
if(obj.attr('target')=='_blank'){
var win=window.open(url, '_blank');
win.focus();
}else{
window.open(url, '_self');
}
event.preventDefault();
}
return true;
}else if(ux_val=='X'){
return false;
}else if(ux_val=='none'){
return false;
}else{
if(exlk=='1'&&ux_val!='1'){
if(obj.attr('href')!=''&&obj.attr('href')!==undefined){
return;
}else{
var url=obj.siblings('.evo_event_schema').find('a').attr('href');
if(obj.attr('target')=='_blank'){ window.open(url);}else{ window.open(url, '_self');}
event.preventDefault();
return false;
}}else{
var event_box=obj.closest('.eventon_list_event');
var click_item=event_box.find('.event_description');
if(click_item.hasClass('open')){
event_box.removeClass('open');
click_item.slideUp().removeClass('open');
}else{
if(SC.accord=='yes'){
cal.find('.eventon_list_event').removeClass('open');
cal.find('.event_description').slideUp().removeClass('open');
}
event_box.addClass('open');
click_item.slideDown().addClass('open');
}
if(obj.attr('data-gmstat')!='1'){
obj.attr({'data-gmstat':'1'});
obj.evoGenmaps({
'fnt':2 ,
'cal':cal,
});
}
if(obj.data('runjs')){
$('body').trigger('evo_load_single_event_content',[ event_id, obj]);
}
$('body').trigger('evo_slidedown_eventcard_complete',[ event_id, obj]);
return false;
}}
});
function init_run_gmap_openevc(delay){
$('.ajde_evcal_calendar').each(function(){
var CAL=$(this);
var SC=CAL.evo_shortcode_data();
if(SC===undefined) return;
if('evc_open' in SC&&SC.evc_open=='yes'){
$(this).find('.desc_trig').each(function(){
if(delay!=''&&delay!==undefined){
$(this).evoGenmaps({'fnt':2, 'cal': CAL, 'delay':delay});
}else{
$(this).evoGenmaps({'fnt':2,'cal': CAL });
}});
}});
}
$('.ajde_evcal_calendar.bub').on('mouseover','.eventon_list_event', function(){
O=$(this);
LIST=O.closest('.eventon_events_list');
title=O.find('.evcal_event_title').html();
p=O.position();
LIST.append(''+ title +" ");
B=LIST.find('.evo_bub_box');
l=p.left;
t=p.top- B.height() -30;
LM=LIST.width();
tl=p.left + B.width() + O.width();
if(tl > LM){
l=l - B.width() +O.width()-20;
}
B.css({'top':t, 'left':l});
LIST.find('.evo_bub_box').addClass('show');
}).on('mouseout',function(){
B=$(this).find('.evo_bub_box').remove();
});
$('body').on('click','.evocmd_button', function(event){
event.preventDefault();
event.stopPropagation();
href=$(this).data('href');
if($(this).data('target')=='yes'){
window.open(href,'_blank');
}else{
window.location=href;
}});
$('body').on('click','.evo-gototoday-btn', function(){
var obj=$(this);
CAL=obj.closest('.ajde_evcal_calendar');
var calid=CAL.attr('id');
CAL.evo_update_cal_sc({F:'fixed_month', V: obj.data('mo')});
CAL.evo_update_cal_sc({F:'fixed_year', V: obj.data('yr')});
run_cal_ajax(calid,'none','today');
obj.fadeOut();
});
$('body').on('evo_main_ajax_before', function(event, CAL, ajaxtype){
if(ajaxtype=='switchmonth') CAL.find('.evo-gototoday-btn').fadeIn();
});
$('body').on('evo_main_ajax_complete', function(event, CAL,ajaxtype, D , data_arg){
var N=moment().utc();
SC=CAL.evo_shortcode_data();
var SU=parseInt(SC.focus_start_date_range);
var M=moment.unix(SU).utc();
if(N.format('YYYY M')==M.format('YYYY M')){
CAL.find('.evo-gototoday-btn').fadeOut();
}
BODY.find('.evo_countdowner').each(function(){
$(this).evo_countdown();
});
});
$('.ajde_evcal_calendar').on('click','.evo-jumper-btn', function(){
$(this).parent().siblings().find('.evo_j_container').slideToggle();
});
$('.evo_j_dates').on('click','a',function(){
var val=$(this).attr('data-val'),
type=$(this).parent().parent().attr('data-val'),
CAL=$(this).closest('.ajde_evcal_calendar');
SC=CAL.evo_shortcode_data();
if(type=='m'){
CAL.evo_update_cal_sc({F:'fixed_month', V: val });
}else{
CAL.evo_update_cal_sc({F:'fixed_year', V: val });
}
run_cal_ajax(CAL.attr('id') ,'none','jumper');
if(SC.expj=='no') container.delay(2000).slideUp();
});
function cal_resets(calOBJ){
calargs=$(calOBJ).find('.cal_arguments');
calargs.attr('data-show_limit_paged', 1);
calOBJ.evo_update_cal_sc({
F:'show_limit_paged',V:'1'
});
}
if($('.ajde_evcal_calendar').hasClass('evcal_widget')){
cal.find('.evcal_gmaps').each(function(){
var gmap_id=obj.attr('id');
var new_gmal_id=gmap_id+'_widget';
obj.attr({'id':new_gmal_id})
});
}
$('body').find('.evo_tab_container').each(function(){
$(this).find('.evo_tab_section').each(function(){
if(!$(this).hasClass('visible')){
$(this).addClass('hidden');
}});
});
$('body').on('click','ul.evo_tabs li',function(){
tab=$(this).data('tab');
tabsection=$(this).closest('.evo_tab_view').find('.evo_tab_container');
tabsection.find('.evo_tab_section').addClass('hidden').removeClass('visible');
tabsection.find('.'+tab).addClass('visible').removeClass('hidden');
$(this).parent().find('li').removeClass('selected');
$(this).addClass('selected');
});
if($('body').find('.evo_layout_changer').length>0){
$('body').find('.evo_layout_changer').each(function(item){
if($(this).parent().hasClass('boxy')){
$(this).find('.fa-th-large').addClass('on');
}else{
$(this).find('.fa-reorder').addClass('on');
}});
$('.evo_layout_changer').on('click','i',function(){
TYPE=$(this).data('type');
$(this).parent().find('i').removeClass('on');
$(this).addClass('on');
if(TYPE=='row'){
$(this).closest('.ajde_evcal_calendar').removeClass('boxy');
}else{
$(this).closest('.ajde_evcal_calendar').addClass('boxy');
}});
}
$('.evo-filter-btn').click(function(){
CAL=$(this).closest('.ajde_evcal_calendar');
line=CAL.find('.eventon_sorting_section');
if(line.is(':visible')){
line.hide();
$(this).removeClass('show');
}else{
line.show();
$(this).addClass('show');
}
CAL.find('.eventon_sort_line').hide();
});
$('.evo-sort-btn').click(function(){
line=$(this).find('.eventon_sort_line');
if(line.is(':visible')){
line.hide();
$(this).removeClass('show');
}else{
line.show();
$(this).addClass('show');
}});
$('.eventon_sort_line').on('click','p',function(){
O=$(this);
var CAL=O.closest('.ajde_evcal_calendar');
var sort_by=O.data('val');
CAL.evo_update_cal_sc({F:'sort_by',V:sort_by});
O.parent().find('p').removeClass('select');
O.addClass('select');
run_cal_ajax(CAL.attr('id'),'none','sorting');
});
$('.filtering_set_val').click(function(){
sortSelect=$(this).closest('.eventon_sorting_section').find('.evo_srt_options');
if(sortSelect.is(':visible')==true) sortSelect.fadeToggle();
var obj=$(this);
var current_Drop=obj.siblings('.eventon_filter_dropdown');
var current_drop_pare=obj.closest('.eventon_filter');
current_drop_pare.siblings('.eventon_filter').find('.eventon_filter_dropdown').each(function(){
if($(this).is(':visible')==true){
$(this).hide();
$(this).siblings('p').removeClass('show');
}});
if(current_Drop.is(':visible')==true){
obj.siblings('.eventon_filter_dropdown').fadeOut('fast');
obj.removeClass('show');
}else{
obj.siblings('.eventon_filter_dropdown').fadeIn('fast');
obj.addClass('show');
}});
$('.eventon_filter_dropdown').on('click','p',function(){
var new_filter_val=$(this).data('filter_val'),
O=$(this),
filter_section=$(this).closest('.eventon_filter_line');
var filter=$(this).closest('.eventon_filter');
var filter_current_set_val=filter.data('filter_val');
var select_filter_type=filter_section.hasClass('selecttype')? true:false;
FILTER_DROPDOWN=$(this).parent();
CAL=$(this).closest('.ajde_evcal_calendar');
if(select_filter_type){
val='';
if(new_filter_val!='all'){
O.parent().find('p.all').removeClass('select');
O.toggleClass('select');
var unselect_count=0;
O.parent().find('p').each(function(){
if($(this).hasClass('select')){
val +=$(this).data('filter_val')+',';
}else{
if(!$(this).hasClass('all')) unselect_count++;
}});
if(unselect_count==0){
O.parent().find('p.all').addClass('select');
val='all';
}
val=(val.slice(-1)==',')? val.slice(0,-1): val;
if(val==''&&O.parent().find('p.all').length==0) val='all';
}else{
if(O.hasClass('select')){
O.parent().find('p').removeClass('select');
}else{
O.parent().find('p').addClass('select');
val='all';
}}
filter.data('filter_val',val);
}else{
if(new_filter_val=='all'){
O.parent().find('p').addClass('select');
}else{
O.parent().find('p').removeClass('select');
O.addClass('select');
}}
if(select_filter_type) return;
if(filter_current_set_val==new_filter_val){
$(this).parent().fadeOut();
}else{
cal_resets(CAL);
filter.data('filter_val', new_filter_val);
CAL.evo_update_sc_from_filters();
run_cal_ajax(CAL.attr('id') ,'none','filering');
var new_filter_name=$(this).html();
O.parent().fadeOut();
O.parent().siblings('.filtering_set_val').removeClass('show');
}});
$('.eventon_filter_dropdown').on('change','input',function(event){
FILTER=$(this).closest('.eventon_filter');
val='';
FILTER.find('input').each(function(){
val=($(this).is(':checked'))? val + $(this).data('filter_val') +',': val;
});
val=(val=='')? '':val;
FILTER.data('filter_val',val);
});
$('body').on('click','.evo_filter_submit',function(){
$(this).closest('.eventon_filter_line').find('.eventon_filter_dropdown').fadeOut();
$(this).closest('.eventon_filter_line').find('.filtering_set_val').removeClass('show');
CAL=$(this).closest('.ajde_evcal_calendar');
cal_resets(CAL);
CAL.evo_update_sc_from_filters();
run_cal_ajax(CAL.attr('id'),'none','filering');
});
$('body')
.on('click','.evoShow_more_events', function(){
CAL=$(this).closest('.ajde_evcal_calendar');
SC=CAL.evo_shortcode_data();
OBJ=$(this);
if(SC.show_limit_redir!==''){
window.location=SC.show_limit_redir; return false;
}
if(SC.show_limit_ajax=='yes'){
CURRENT_PAGED=parseInt(SC.show_limit_paged);
CAL.evo_update_cal_sc({F:'show_limit_paged', V: CURRENT_PAGED+1});
run_cal_ajax(CAL.attr('id'), 'none','paged');
}else{
var event_count=parseInt(SC.event_count);
var eventList=OBJ.parent();
var allEvents=eventList.find('.eventon_list_event').length;
var currentShowing=eventList.find('.eventon_list_event:visible').length;
for(x=1; x<=event_count ; x++){
var inde=currentShowing+x-1;
eventList.find('.eventon_list_event:eq('+ inde+')').slideDown();
}
if(allEvents > currentShowing&&allEvents<=(currentShowing+event_count)){
$(this).fadeOut();
}}
})
.on('click','.evcal_btn_prev', function(){
var cal_id=$(this).closest('.ajde_evcal_calendar').attr('id');
var direction=$(this).closest('.ajde_evcal_calendar').hasClass('evortl')? 'next': 'prev';
run_cal_ajax(cal_id, direction ,'switchmonth');
})
.on('click','.evcal_btn_next',function(){
var cal_id=$(this).closest('.ajde_evcal_calendar').attr('id');
var direction=$(this).closest('.ajde_evcal_calendar').hasClass('evortl')? 'prev': 'next';
run_cal_ajax(cal_id, direction ,'switchmonth');
})
.on('calendar_month_changed',function(event, CAL){
SC=CAL.evo_shortcode_data();
var O=CAL.find('.evo_j_container');
O.find('.evo_j_months a').removeClass('set');
O.find('.evo_j_months a[data-val="'+ SC.fixed_month +'"]').addClass('set');
O.find('.evo_j_years a').removeClass('set');
O.find('.evo_j_years a[data-val="'+ SC.fixed_year +'"]').addClass('set');
B=CAL.find('.evo-gototoday-btn');
if(SC.fixed_month!=B.data('mo')||SC.fixed_year!=B.data('yr')){
B.show();
}})
.on('click', '.evo_vSW',function(){
O=$(this);
if(O.hasClass('focus')) return;
O.siblings('.evo_vSW').removeClass('focus');
O.addClass('focus');
CAL=O.closest('.ajde_evcal_calendar');
CAL.find('.evoADDS').fadeOut().delay(200).queue(function(){
$(this).remove();
});
if(O.hasClass('evoD')){
CAL.evo_update_cal_sc({F:'calendar_type', V: 'default'});
CAL.find('#evcal_list').removeClass('evo_hide');
CAL.find('.eventon_list_event').show();
}
$('body').trigger('evo_vSW_clicked', [ O, CAL]);
})
.on('click','.evobtn_details_show_more',function(){
control_more_less($(this));
})
.on('runajax_refresh_now_cal',function(e, OBJ, nonce){
var dataA={
action: 'eventon_refresh_now_cal',
nonce: nonce,
other: OBJ.data()
};
const section=OBJ.closest('.evo_eventon_live_now_section');
$.ajax({
beforeSend: function(){
section.addClass('evoloading');
},
type: 'POST',url:the_ajax_script.ajaxurl,data: dataA,dataType:'json',
success:function(data){
if(data.status=='good'){
section.html(data.html);
}},complete:function(data){
section.removeClass('evoloading');
BODY.find('.evo_countdowner').each(function(){
$(this).evo_countdown();
});
}});
});
;
function run_cal_ajax(cal_id, direction, ajaxtype){
var CAL=ev_cal=$('#'+cal_id);
if(CAL.attr('data-runajax')!='0'){
var cat=CAL.find('.evcal_sort').attr('cat');
if(ajaxtype=='switchmonth'){
CAL.find('.cal_arguments').attr('data-show_limit_paged',1);
CAL.evo_update_cal_sc({F:'show_limit_paged', V: '1'});
}
SC=CAL.evo_shortcode_data();
$('body').trigger('evo_main_ajax_before', [CAL, ajaxtype, direction, SC]);
var data_arg={
action: 'the_ajax_hook',
direction: direction,
shortcode: SC,
ajaxtype: ajaxtype,
};
EVENTS_LIST=ev_cal.find('.eventon_events_list');
$.ajax({
beforeSend: function(){
ev_cal.addClass('evo_loading');
if(ajaxtype!='paged') EVENTS_LIST.slideUp('fast');
if(ajaxtype=='paged'){
txt=EVENTS_LIST.find('.evoShow_more_events').html();
EVENTS_LIST.find('.evoShow_more_events').html('. . .').data('txt',txt);
}
ev_cal.evo_loader_animation();
},
type: 'POST',url:the_ajax_script.ajaxurl,data: data_arg,dataType:'json',
success:function(data){
if(!data) return false;
if(ajaxtype=='paged'){
EVENTS_LIST.find('.evoShow_more_events').remove();
EVENTS_LIST.find('.clear').remove();
EVENTS_LIST.append(data.html + "
");
var events_in_list=EVENTS_LIST.find('.eventon_list_event').length;
if('total_events' in data&&data.total_events==events_in_list){
EVENTS_LIST.find('.evoShow_more_events').hide();
}
var T={};
EVENTS_LIST.find('.evcal_month_line').each(function(){
d=$(this).data('d');
if(T[d])
$(this).remove();
else
T[d]=true;
});
var T={};
EVENTS_LIST.find('.sep_month_events').each(function(){
d=$(this).data('d');
if(T[d]){
var H=$(this).html();
EVENTS_LIST.find('.sep_month_events[data-d="'+d+'"]').append(H);
$(this).remove();
}else{T[d]=true;}});
}else{
EVENTS_LIST.html(data.html);
}
animate_month_switch(data.cal_month_title, ev_cal.find('.evo_month_title'));
ev_cal.evo_update_all_cal_sc({SC: data.SC});
ev_cal.find('.evo_cal_events').data('events', data.json);
$('body').trigger('calendar_month_changed',[CAL]);
$('body').trigger('evo_main_ajax_success', [CAL, ajaxtype, data, data_arg]);
},complete:function(data){
ev_cal.evo_loader_animation({direction:'end'});
if(! EVENTS_LIST.hasClass('evo_hide')) EVENTS_LIST.delay(300).slideDown('slow');
ev_cal.evoGenmaps({'delay':400});
init_run_gmap_openevc(600);
fullheight_img_reset(cal_id);
$('body').trigger('evo_main_ajax_complete', [CAL, ajaxtype, data.responseJSON , data_arg]);
ev_cal.removeClass('evo_loading');
}});
}}
$('body').on('evo_run_cal_ajax',function(event,cal_id, direction, ajaxtype){
run_cal_ajax(cal_id, direction, ajaxtype);
});
function ajax_post_content(sortby, cal_id, direction, ajaxtype){
run_cal_ajax(cal_id, direction, ajaxtype);
}
function animate_month_switch(new_data, title_element){
var current_text=title_element.html();
var CAL=title_element.closest('.ajde_evcal_calendar');
if(CAL.hasClass('evortl')){
title_element.html(new_data);
return;
}
var hei=title_element.height();
var wid=title_element.width();
title_element.html(""+current_text+" "+new_data+" ").width(wid);
var LC_w=title_element.find('span:last-child').width()+5;
title_element.find('span:first-child').fadeOut(800);
title_element.find('span:last-child').fadeIn(800, function(){
title_element.html(new_data);
});
title_element.animate({width: LC_w},800);
}
function control_more_less(obj){
var content=obj.attr('content');
var current_text=obj.find('.ev_more_text').html();
var changeTo_text=obj.find('.ev_more_text').attr('data-txt');
const cell=obj.closest('.evcal_evdata_cell');
if(content=='less'){
obj.closest('.evcal_evdata_cell').removeClass('shorter_desc');
obj.attr({'content':'more'});
obj.find('.ev_more_arrow').removeClass('ard');
obj.find('.ev_more_text').attr({'data-txt':current_text}).html(changeTo_text);
}else{
obj.closest('.evcal_evdata_cell').addClass('shorter_desc');
obj.attr({'content':'less'});
obj.find('.ev_more_arrow').addClass('ard');
obj.find('.ev_more_text').attr({'data-txt':current_text}).html(changeTo_text);
}}
$('body').on('click','.evcal_evdata_img',function(){
if(!$(this).hasClass('evo_noclick')){
feature_image_expansion($(this), 'click');
}});
function feature_image_expansion(image, type){
img=image;
var img_status=img.attr('data-status');
var img_style=img.attr('data-imgstyle');
if(img_status=='open'){
img.attr({'data-status':'close'}).css({'height':''});
}else{
var img_full_height=parseInt(img.attr('data-imgheight'));
var cal_width=parseInt(img.closest('.ajde_evcal_calendar').width());
cal_width=(cal_width)? cal_width: img.width();
var img_full_width=parseInt(img.attr('data-imgwidth'));
if(img_style=='100per'){
relative_height=img_full_height;
}else if(img_style=='full'){
relative_height=parseInt(img_full_height * (cal_width/img_full_width)) ;
}else{
if(type=='click'){
relative_height=parseInt(img_full_height * (cal_width/img_full_width));
relative_height=(relative_height)? relative_height: img_full_height;
relative_height=parseInt((cal_width * img_full_height) /img_full_width);
}else{
relative_height=img.attr('data-minheight');
}}
if(img_status==''&&img_style=='minmized'){
img.attr({'data-status':'close'}).removeClass('expanded');
}else{
img.attr({'data-status':'open'}).addClass('expanded');
}
img.css({'height':relative_height});
}}
function fullheight_img_reset(calid){
if(calid){
$('#'+calid).find('.eventon_list_event .evo_metarow_fimg').each(function(){
feature_image_expansion($(this));
});
}else{
$('.evo_metarow_fimg').each(function(){
feature_image_expansion($(this));
});
}}
function treat_events(calid){
if(calid!=''){
if(is_mobile()){
$('#'+calid).find('.evo_metarow_getDr form').attr({'target':'_self'});
}}
}
function is_mobile(){
return(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))? true: false;
}
$('body').on('click','.editEventBtnET', function(event){
event.stopPropagation();
href=$(this).attr('href');
window.open(href);
});
$('body').on('click','.evo_repeat_series_date',function(){
if($(this).parent().data('click')){
URL=$(this).data('l');
window.location=URL;
}});
$('body').find('.evo_location_map').each(function(){
THIS=$(this);
MAPID=THIS.attr('id');
var location_type=THIS.attr('data-location_type');
if(location_type=='add'){
var address=THIS.attr('data-address');
var location_type='add';
}else{
var address=THIS.attr('data-latlng');
var location_type='latlng';
}
zoom=parseInt(THIS.data('zoom'));
scrollwheel=THIS.data('scroll')=='yes'? true: false;
THIS.evoGenmaps({
'fnt':5,
map_canvas_id: MAPID,
location_type: location_type,
address:address,
zoomlevel: zoom,
mapformat: THIS.data('mty'),
scroll: scrollwheel,
});
});
$('body').on('evo_load_single_event_content', function(event, eid, obj){
var ajaxdataa={};
ajaxdataa['action']='eventon_load_event_content';
ajaxdataa['eid']=eid;
ajaxdataa['nonce']=the_ajax_script.postnonce;
if(obj.data('j')){
$.each(obj.data('j'), function(index,val){
ajaxdataa[ index]=val;
});
}
$.ajax({
beforeSend: function(){ },
url: the_ajax_script.ajaxurl,
data: ajaxdataa, dataType:'json', type: 'POST',
success:function(data){
$('body').trigger('evo_single_event_content_loaded', [data, obj]);
},complete:function(){ }});
});
if(is_mobile()){
if($('body').find('.fb.evo_ss').length!=0){
$('body').find('.fb.evo_ss').each(function(){
obj=$(this);
obj.attr({'href':'http://m.facebook.com/sharer.php?u='+obj.attr('data-url')});
});
}}
if($('body').find('.evo_sin_page').length>0){
$('.evo_sin_page').each(function(){
$('body').trigger('evo_load_single_event_content',[ $(this).data('eid'), $(this)]);
$(this).find('.desc_trig ').attr({'data-ux_val':'none'});
});
}
$('.eventon_single_event').on('click', '.evcal_list_a',function(event){
var obj=$(this);
var CAL=obj.closest('.ajde_evcal_calendar');
var SC=CAL.evo_shortcode_data();
event.preventDefault();
if(SC.ux_val==4){
var url=obj.parent().siblings('.evo_event_schema').find('[itemprop=url]').attr('href');
window.location.href=url;
}else if(SC.ux_val=='2'){
var url=SC.exturl;
window.location.href=url;
}else if(SC.ux_val=='X'){
return false;
}});
$('body').find('.eventon_single_event').each(function(){
var _this=$(this);
var CAL=_this.closest('.ajde_evcal_calendar');
var SC=CAL.evo_shortcode_data();
var evObj=CAL.find('.eventon_list_event');
if(SC.expanded=='yes'){
_this.find('.evcal_eventcard').show();
var idd=_this.find('.evcal_gmaps');
_this.find('.evcal_close').parent().css({'padding-right':0});
_this.find('.evcal_close').hide();
var obj=_this.find('.desc_trig');
obj.evoGenmaps({
'fnt':2,
'cal':CAL,
});
}else if(SC.uxval=='3'){
var obj=_this.find('.desc_trig');
obj.removeAttr('data-exlk').attr({'data-ux_val':'3'});
}
var ev_excerpt=CAL.find('.event_excerpt').html();
if(ev_excerpt!=''&&ev_excerpt!==undefined&&SC.excerpt=='yes'){
var appendation=''+ev_excerpt+'
'
evObj.append(appendation);
}});
$('body').on('click','.ajde_yn_btn ', function(event){
if($('body').hasClass('wp-admin')) return false;
var obj=$(this);
var afterstatement=obj.attr('afterstatement');
afterstatement=(afterstatement===undefined)? obj.attr('data-afterstatement'): afterstatement;
var uid='';
if(obj.hasClass('NO')){
obj.removeClass('NO');
obj.siblings('input').val('yes');
if(afterstatement!=''){
var type=(obj.attr('as_type')=='class')? '.':'#';
if(obj.data('uid')!==undefined) uid=obj.data('uid');
$(type+ afterstatement).slideDown('fast');
}}else{
obj.addClass('NO');
obj.siblings('input').val('no');
if(afterstatement!=''){
var type=(obj.attr('as_type')=='class')? '.':'#';
$(type+ afterstatement).slideUp('fast');
}}
});
$.fn.evo_enterKey=function (fnc){
return this.each(function (){
$(this).keypress(function (ev){
var keycode=(ev.keyCode ? ev.keyCode:ev.which);
if(keycode=='13'){
fnc.call(this, ev);
}})
})
}
$('.evo-search').on('click',function(){
var section=$(this).closest('.calendar_header');
var item=section.find('.evo_search_bar');
item.slideToggle('2000', function(){
if(item.is(':visible')) item.find('input').focus();
});
});
$('body').on('click','.evo_do_search',function(){
do_search_box($(this));
});
$(".evosr_search_box input").evo_enterKey(function (){
do_search_box($(this).siblings('.evo_do_search'));
});
function do_search_box(OBJ){
SearchVal=OBJ.closest('.evosr_search_box').find('input').val();
Evosearch=OBJ.closest('.EVOSR_section');
OBJ.closest('.evo_search_entry').find('.evosr_msg').hide();
if(SearchVal===undefined||SearchVal==''){
OBJ.closest('.evo_search_entry').find('.evosr_msg').show();
return false;
}
SC=Evosearch.find('span.data').evo_item_shortcodes();
var data_arg={
action: 'eventon_search_evo_events',
search: SearchVal,
shortcode: SC
};
$.ajax({
beforeSend: function(){
Evosearch.find('.evo_search_results_count').hide();
Evosearch.addClass('searching');
},
type: 'POST',
url:the_ajax_script.ajaxurl,
data: data_arg,
dataType:'json',
success:function(data){
Evosearch.find('.evo_search_results').html(data.content);
if(Evosearch.find('.no_events').length>0){
}else{
Events=Evosearch.find('.evo_search_results').find('.eventon_list_event').length;
Evosearch.find('.evo_search_results_count span').html(Events);
Evosearch.find('.evo_search_results_count').fadeIn();
}},complete: function(){
Evosearch.removeClass('searching');
}});
}
$('body').on('click','.evosr_search_btn',function(){ search_within_calendar($(this).siblings('input')); });
$(".evo_search_bar_in input").evo_enterKey(function (){ search_within_calendar($(this)); });
function search_within_calendar(obj){
var ev_cal=obj.closest('.ajde_evcal_calendar');
ev_cal.evo_update_cal_sc({F:'show_limit_paged',V: '1' });
ev_cal.evo_update_cal_sc({F:'s',V: obj.val() });
run_cal_ajax(ev_cal.attr('id'),'none','search');
return false;
}
$('body').on('click','.evo_event_more_img',function(){
var O=$(this);
var eCARD=O.closest('.evcal_eventcard');
var fIMG=O.find('img');
var fURL=fIMG.data('f');
O.parent().find('span').removeClass('select'); O.addClass('select');
eCARD.find('img.evo_event_main_img').attr({'src': fURL});
relIMG=eCARD.find('.evo_metarow_fimg');
relIMG.css('background-image', 'url('+ fURL +')');
relIMG.data('imgheight', fIMG.data('h'));
});
function handlebar_additional_arguments(){
Handlebars.registerHelper('ifE',function(v1, options){
return (v1!==undefined&&v1!=''&&v1)
? options.fn(this)
: options.inverse(this);
});
Handlebars.registerHelper('ifEQ',function(v1, v2, options){
return(v1==v2)? options.fn(this): options.inverse(this);
});
Handlebars.registerHelper('ifNEQ',function(v1, v2, options){
return(v1!=v2)? options.fn(this): options.inverse(this);
});
Handlebars.registerHelper('BUStxt',function(V, options){
if(!(V in BUS.txt)) return V;
return BUS.txt[V];
});
Handlebars.registerHelper('GetDMnames',function(V, U, options){
return BUS.dms[U][ V ];
});
Handlebars.registerHelper('forAdds',function(count, add_val, options){
O='';
for(x=1; x<=count; x++){ O +=add_val; }
return O;
});
Handlebars.registerHelper('GetEvProp',function(EID, PROP, CALID){
EID=EID.split('-');
EV=$('#'+ CALID).find('.evo_cal_events').data('events');
var O='';
$.each(EV, function(i,d){
if(d.ID==EID[0]&&d.ri==EID[1]){
if(!(PROP in d.event_pmv)) return;
O=d.event_pmv[PROP][0];
}});
return O;
});
Handlebars.registerHelper('GetEvV',function(EID, PROP, CALID){
EID=EID.split('-');
EV=$('#'+ CALID).find('.evo_cal_events').data('events');
var O='';
$.each(EV, function(i,d){
if(d.ID==EID[0]&&d.ri==EID[1]){
O=d[PROP];
}});
return O;
});
Handlebars.registerHelper('COUNT',function(V){
return Object.keys(V).length;
});
Handlebars.registerHelper('CountlimitLess',function(AR, C,options){
var L=Object.keys(AR).length;
return(L < C)? options.inverse(this): options.fn(this);
});
Handlebars.registerHelper('ifCOND',function(v1, operator, v2, options){
return checkCondition(v1, operator, v2)
? options.fn(this)
: options.inverse(this);
});
Handlebars.registerHelper('toJSON', function(obj){
return new Handlebars.SafeString(JSON.stringify(obj));
});
Handlebars.registerHelper('Cal_def_check',function(V, options){
if(BUS.cal_def&&BUS.cal_def[V]) return options.fn(this);
return options.inverse(this);
});
Handlebars.registerHelper('TypeCheck',function(V, options){
if(options.type==V) return options.fn(this);
return options.inverse(this);
});
}
function checkCondition(v1, operator, v2){
switch(operator){
case '==':
return (v1==v2);
case '===':
return (v1===v2);
case '!==':
return (v1!==v2);
case '<':
return (v1 < v2);
case '<=':
return (v1 <=v2);
case '>':
return (v1 > v2);
case '>=':
return (v1 >=v2);
case '&&':
return (v1&&v2);
case '||':
return (v1||v2);
default:
return false;
}}
$('body').on('click','.evo_qty_change', function(event){
var OBJ=$(this);
var QTY=oQTY=parseInt(OBJ.siblings('em').html());
var MAX=OBJ.siblings('input').attr('max');
var BOX=OBJ.closest('.evo_purchase_box');
var pfd=BOX.find('.evo_purchase_box_data').data('pfd');
(OBJ.hasClass('plu'))? QTY++: QTY--;
QTY=(QTY==0)? 1: QTY;
QTY=(MAX!=''&&QTY > MAX)? MAX: QTY;
var sin_price=OBJ.parent().data('p');
new_price=sin_price * QTY;
new_price=get_format_price(new_price, pfd);
BOX.find('.total .value').html(new_price);
OBJ.siblings('em').html(QTY);
OBJ.siblings('input').val(QTY);
$('body').trigger('evo_qty_changed',[QTY,oQTY, new_price,OBJ ]);
});
function get_format_price(price, data){
PF=data;
totalPrice=price.toFixed(PF.numDec);
htmlPrice=totalPrice.toString().replace('.', PF.decSep);
if(PF.thoSep.length > 0){
htmlPrice=_addThousandSep(htmlPrice, PF.thoSep);
}
if(PF.curPos=='right'){
htmlPrice=htmlPrice + PF.currencySymbol;
}
else if(PF.curPos=='right_space'){
htmlPrice=htmlPrice + ' ' + PF.currencySymbol;
}
else if(PF.curPos=='left_space'){
htmlPrice=PF.currencySymbol + ' ' + htmlPrice;
}else{
htmlPrice=PF.currencySymbol + htmlPrice;
}
return htmlPrice;
}
function _addThousandSep(n, thoSep){
var rx=/(\d+)(\d{3})/;
return String(n).replace(/^\d+/, function(w){
while(rx.test(w)){
w=w.replace(rx, '$1'+thoSep+'$2');
}
return w;
});
};});
!function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r